diff options
author | rsc <devnull@localhost> | 2004-04-10 18:53:55 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-04-10 18:53:55 +0000 |
commit | cfa37a7b1131abbab2e7d339b451f5f0e3198cc8 (patch) | |
tree | a7fe52416e9d27efe2af2d54910112674c0fd7c6 /man/man3/nan.3 | |
parent | 08df2a433e69c94f9db002c83380cb2b693fee60 (diff) | |
download | plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.tar.gz plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.tar.bz2 plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.zip |
Lots of man pages.
Diffstat (limited to 'man/man3/nan.3')
-rw-r--r-- | man/man3/nan.3 | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/man/man3/nan.3 b/man/man3/nan.3 new file mode 100644 index 00000000..b0280125 --- /dev/null +++ b/man/man3/nan.3 @@ -0,0 +1,44 @@ +.TH NAN 3 +.SH NAME +NaN, Inf, isNaN, isInf \- not-a-number and infinity functions +.SH SYNOPSIS +.B #include <u.h> +.br +.B #include <libc.h> +.PP +.ta \w'\fLdouble 'u +.B +double NaN(void) +.PP +.B +double Inf(int) +.PP +.B +int isNaN(double) +.PP +.B +int isInf(double, int) +.SH DESCRIPTION +The IEEE floating point standard defines values called +`not-a-number' and positive and negative `infinity'. +These values can be produced by such things as overflow +and division by zero. +Also, the library functions sometimes return them when +the arguments are not in the domain, or the result is +out of range. +.PP +.I NaN +returns a double that is not-a-number. +.I IsNaN +returns true if its argument is not-a-number. +.PP +.IR Inf ( i ) +returns positive infinity if +.I i +is greater than or equal to zero, +else negative infinity. +.I IsInf +returns true if its first argument is infinity +with the same sign as the second argument. +.SH SOURCE +.B /sys/src/libc/port/nan.c |