summaryrefslogtreecommitdiff
path: root/gsl-1.9/integration/positivity.c
blob: cfa89f151f299c669a65339429be447bbe1be0f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Compare the integral of f(x) with the integral of |f(x)|
   to determine if f(x) covers both positive and negative values */

static inline int
test_positivity (double result, double resabs);

static inline int
test_positivity (double result, double resabs)
{
  int status = (fabs (result) >= (1 - 50 * GSL_DBL_EPSILON) * resabs);

  return status;
}