gsl_integration__positivity.c 354 B

1234567891011121314
  1. /* Compare the integral of f(x) with the integral of |f(x)|
  2. to determine if f(x) covers both positive and negative values */
  3. static inline int
  4. test_positivity (double result, double resabs);
  5. static inline int
  6. test_positivity (double result, double resabs)
  7. {
  8. int status = (fabs (result) >= (1 - 50 * GSL_DBL_EPSILON) * resabs);
  9. return status;
  10. }