Commit 82057e51 authored by Laurent Belcour's avatar Laurent Belcour

Correction of the ALPHA generation script.

Updating the common code to include a windows version of Erf.
Removing the parsec version of QuadProg++ from the initial compile.
parent 29ee20bf
TEMPLATE = subdirs
SUBDIRS = quadprog++-v2
SUBDIRS = quadprog++ \
# quadprog++-v2
......@@ -276,6 +276,30 @@ template<typename T> bool isnan(T x)
{
return x==std::numeric_limits<T>::signaling_NaN();
}
template<typename T> T erf(T x)
{
// constants
const double a1 = 0.254829592;
const double a2 = -0.284496736;
const double a3 = 1.421413741;
const double a4 = -1.453152027;
const double a5 = 1.061405429;
const double p = 0.3275911;
// Save the sign of x
int sign = 1;
if (x < 0) {
sign = -1;
}
x = fabs(x);
// A&S formula 7.1.26
const double t = 1.0/(1.0 + p*x);
const double y = 1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x);
return sign*y;
}
#endif
#ifdef _WIN32
......
......@@ -11,6 +11,7 @@ rm -rf sources/tests
rm -rf sources/matlab
rm -rf sources/xml
rm -rf sources/scripts/unitary*
rm -rf sources/external/quadprog++-v2
rm -rf sources/plugins/*retro*
rm -rf sources/plugins/shifted_gamma_function
rm -rf sources/plugins/rational_fitter_parsec_*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment