You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-05 16:15:50 +03:00
std::sqrt
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include "corr.h"
|
||||
|
||||
@@ -193,8 +194,8 @@ mcsv1_UDAF::ReturnCode corr::evaluate(mcsv1Context* context, static_any::any& va
|
||||
// When var_popy is 0, NULL is the result
|
||||
return mcsv1_UDAF::SUCCESS;
|
||||
}
|
||||
long double std_popx = sqrt(var_popx);
|
||||
long double std_popy = sqrt(var_popy);
|
||||
long double std_popx = std::sqrt(var_popx);
|
||||
long double std_popy = std::sqrt(var_popy);
|
||||
long double corr = cxy / (std_popy * std_popx * N);
|
||||
valOut = static_cast<double>(corr);
|
||||
}
|
||||
|
@@ -15,13 +15,9 @@
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include <sstream>
|
||||
#include <cstring>
|
||||
#include <typeinfo>
|
||||
#include "regr_r2.h"
|
||||
#include "bytestream.h"
|
||||
#include "objectreader.h"
|
||||
|
||||
#include <cmath>
|
||||
using namespace mcsv1sdk;
|
||||
|
||||
class Add_regr_r2_ToUDAFMap
|
||||
@@ -197,8 +193,8 @@ mcsv1_UDAF::ReturnCode regr_r2::evaluate(mcsv1Context* context, static_any::any&
|
||||
valOut = 1.0;
|
||||
return mcsv1_UDAF::SUCCESS;
|
||||
}
|
||||
long double std_popx = sqrt(var_popx);
|
||||
long double std_popy = sqrt(var_popy);
|
||||
long double std_popx = std::sqrt(var_popx);
|
||||
long double std_popy = std::sqrt(var_popy);
|
||||
long double corr = cxy / (std_popy * std_popx * N);
|
||||
valOut = static_cast<double>(corr * corr);
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
#include <my_config.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string.h>
|
||||
|
||||
#include "idb_mysql.h"
|
||||
@@ -597,8 +595,8 @@ extern "C"
|
||||
// When var_popy is 0, 1 is the result
|
||||
return 1;
|
||||
}
|
||||
long double std_popx = sqrt(var_popx);
|
||||
long double std_popy = sqrt(var_popy);
|
||||
long double std_popx = std::sqrt(var_popx);
|
||||
long double std_popy = std::sqrt(var_popy);
|
||||
long double covar_pop = (sumxy - ((sumx * sumy) / N)) / N;
|
||||
long double corr = covar_pop / (std_popy * std_popx);
|
||||
valOut = static_cast<double>(corr * corr);
|
||||
@@ -717,8 +715,8 @@ extern "C"
|
||||
// When var_popy is 0, 1 is the result
|
||||
return 1;
|
||||
}
|
||||
long double std_popx = sqrt(var_popx);
|
||||
long double std_popy = sqrt(var_popy);
|
||||
long double std_popx = std::sqrt(var_popx);
|
||||
long double std_popy = std::sqrt(var_popy);
|
||||
long double covar_pop = (sumxy - ((sumx * sumy) / N)) / N;
|
||||
long double corr = covar_pop / (std_popy * std_popx);
|
||||
return static_cast<double>(corr);
|
||||
|
Reference in New Issue
Block a user