getPowerDeriv: workaround for MS Visual Studio
parent
94f82b312b
commit
1428fcb9f8
|
@ -634,6 +634,9 @@ DataTree::writePowerDeriv(ostream &output, bool use_dll) const
|
|||
<< " */" << endl
|
||||
<< "double getPowerDeriv(double x, double p, int k)" << endl
|
||||
<< "{" << endl
|
||||
<< "#ifdef _MSC_VER" << endl
|
||||
<< "# define nearbyint(x) (fabs((x)-floor(x)) < fabs((x)-ceil(x)) ? floor(x) : ceil(x))" << endl
|
||||
<< "#endif" << endl
|
||||
<< " if ( fabs(x) < " << NEAR_ZERO << " && p > 0 && k >= p && fabs(p-nearbyint(p)) < " << NEAR_ZERO << " )" << endl
|
||||
<< " return 0.0;" << endl
|
||||
<< " else" << endl
|
||||
|
|
Loading…
Reference in New Issue