summaryrefslogtreecommitdiff
path: root/static/plan9-4e/man2/nan.2
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
commit97d5c458cfa039d857301e1ca7d5af3beb37131d (patch)
treeb460cd850d0537eb71806ba30358840377b27688 /static/plan9-4e/man2/nan.2
parentb89dc2331a50c63f8b33272a5c4c61ab98abdaa3 (diff)
build: Better Build System
Diffstat (limited to 'static/plan9-4e/man2/nan.2')
-rw-r--r--static/plan9-4e/man2/nan.244
1 files changed, 44 insertions, 0 deletions
diff --git a/static/plan9-4e/man2/nan.2 b/static/plan9-4e/man2/nan.2
new file mode 100644
index 00000000..84ede0db
--- /dev/null
+++ b/static/plan9-4e/man2/nan.2
@@ -0,0 +1,44 @@
+.TH NAN 2
+.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