1INFNAN(3) Linux Programmer's Manual INFNAN(3)
2
3
4
6 infnan - deal with infinite or not-a-number (NaN) result
7
9 #include <math.h>
10
11 double infnan(int error);
12
13 Link with -lm.
14
16 The infnan() function returns a suitable value for infinity and "not-a-
17 number" (NaN) results. The value of error can be ERANGE to represent
18 infinity or anything else to represent NaN. errno is also set.
19
21 If error is ERANGE (Infinity), HUGE_VAL is returned.
22
23 If error is -ERANGE (-Infinity), -HUGE_VAL is returned.
24
25 If error is anything else, NAN is returned.
26
28 EDOM The value of error is "not-a-number" (NaN).
29
30 ERANGE The value of error is positive infinity or negative infinity.
31
33 4.3BSD.
34
36 This obsolete function was provided in libc4 and libc5, but is not
37 available in glibc2.
38
40 This page is part of release 3.22 of the Linux man-pages project. A
41 description of the project, and information about reporting bugs, can
42 be found at http://www.kernel.org/doc/man-pages/.
43
44
45
46GNU 1993-06-02 INFNAN(3)