[poincare] Fix compilation: change std::abs to std::fabs when the

argument isn't complex
This commit is contained in:
Émilie Feral
2019-09-05 13:31:10 +02:00
parent cb69f42055
commit 5481d3c822
3 changed files with 4 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ void assert_hypergeometric_is(double a, double b, double c, double z, double res
double r = 0.0;
const double precision = FLT_EPSILON;
quiz_assert(hypergeometricFunction(a, b, c, z, precision, 1000, &r));
quiz_assert(std::abs(r - result)/result <= 100 * precision); // Multiply by 100 because precision is too strict
quiz_assert(std::fabs(r - result)/result <= 100 * precision); // Multiply by 100 because precision is too strict
}
QUIZ_CASE(hypergeometric_function) {