3 cfa37a7b 2004-04-10 devnull NaN, Inf, isNaN, isInf \- not-a-number and infinity functions
4 cfa37a7b 2004-04-10 devnull .SH SYNOPSIS
5 cfa37a7b 2004-04-10 devnull .B #include <u.h>
7 cfa37a7b 2004-04-10 devnull .B #include <libc.h>
9 cfa37a7b 2004-04-10 devnull .ta \w'\fLdouble 'u
11 cfa37a7b 2004-04-10 devnull double NaN(void)
14 cfa37a7b 2004-04-10 devnull double Inf(int)
17 cfa37a7b 2004-04-10 devnull int isNaN(double)
20 cfa37a7b 2004-04-10 devnull int isInf(double, int)
21 cfa37a7b 2004-04-10 devnull .SH DESCRIPTION
22 cfa37a7b 2004-04-10 devnull The IEEE floating point standard defines values called
23 cfa37a7b 2004-04-10 devnull `not-a-number' and positive and negative `infinity'.
24 cfa37a7b 2004-04-10 devnull These values can be produced by such things as overflow
25 cfa37a7b 2004-04-10 devnull and division by zero.
26 cfa37a7b 2004-04-10 devnull Also, the library functions sometimes return them when
27 cfa37a7b 2004-04-10 devnull the arguments are not in the domain, or the result is
28 cfa37a7b 2004-04-10 devnull out of range.
31 cfa37a7b 2004-04-10 devnull returns a double that is not-a-number.
33 cfa37a7b 2004-04-10 devnull returns true if its argument is not-a-number.
35 cfa37a7b 2004-04-10 devnull .IR Inf ( i )
36 cfa37a7b 2004-04-10 devnull returns positive infinity if
38 cfa37a7b 2004-04-10 devnull is greater than or equal to zero,
39 cfa37a7b 2004-04-10 devnull else negative infinity.
41 cfa37a7b 2004-04-10 devnull returns true if its first argument is infinity
42 cfa37a7b 2004-04-10 devnull with the same sign as the second argument.
43 cfa37a7b 2004-04-10 devnull .SH SOURCE
44 c3674de4 2005-01-11 devnull .B \*9/src/lib9/nan.c