File: positivity.c

package info (click to toggle)
gsl 2.3%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 20,392 kB
  • ctags: 15,188
  • sloc: ansic: 235,014; sh: 11,541; makefile: 869
file content (13 lines) | stat: -rw-r--r-- 354 bytes parent folder | download | duplicates (30)
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;
}