diff options
Diffstat (limited to 'gsl-1.9/integration/positivity.c')
-rw-r--r-- | gsl-1.9/integration/positivity.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gsl-1.9/integration/positivity.c b/gsl-1.9/integration/positivity.c new file mode 100644 index 0000000..cfa89f1 --- /dev/null +++ b/gsl-1.9/integration/positivity.c @@ -0,0 +1,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; +} |