]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/INFINITY.3
Convert to American spelling conventions
[thirdparty/man-pages.git] / man3 / INFINITY.3
CommitLineData
fea681da
MK
1.\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
2.\"
3.\" Permission is granted to make and distribute verbatim copies of this
4.\" manual provided the copyright notice and this permission notice are
5.\" preserved on all copies.
6.\"
7.\" Permission is granted to copy and distribute modified versions of this
8.\" manual under the conditions for verbatim copying, provided that the
9.\" entire resulting derived work is distributed under the terms of a
10.\" permission notice identical to this one.
c13182ef 11.\"
fea681da
MK
12.\" Since the Linux kernel and libraries are constantly changing, this
13.\" manual page may be incorrect or out-of-date. The author(s) assume no
14.\" responsibility for errors or omissions, or for damages resulting from
15.\" the use of the information contained herein. The author(s) may not
16.\" have taken the same level of care in the production of this manual,
17.\" which is licensed free of charge, as they might when working
18.\" professionally.
c13182ef 19.\"
fea681da
MK
20.\" Formatted or processed versions of this manual, if unaccompanied by
21.\" the source, must acknowledge the copyright and authors of this work.
22.\"
23.TH INFINITY 3 2004-10-31 "" "Linux Programmer's Manual"
24.SH NAME
c65433e6 25INFINITY, NAN, HUGE_VAL, HUGE_VALF, HUGE_VALL \- floating point constants
fea681da
MK
26.SH SYNOPSIS
27.nf
28#define _ISOC99_SOURCE
29.br
30.B #include <math.h>
31.sp
32.B INFINITY
33.sp
34.B NAN
35.sp
36.B HUGE_VAL
37.br
38.B HUGE_VALF
39.br
40.B HUGE_VALL
41.fi
42.SH DESCRIPTION
43The macro
44.B INFINITY
45expands to a float constant representing positive infinity.
46
47The macro
48.B NAN
49expands to a float constant representing a quiet NaN
c13182ef
MK
50(when supported).
51A
fea681da
MK
52.I quiet
53NaN is a NaN ("not-a-number") that does not raise exceptions
c13182ef
MK
54when it is used in arithmetic.
55The opposite is a
d9bfdb9c 56.I signaling
c13182ef
MK
57NaN.
58See IEC 60559:1989.
fea681da
MK
59
60The macros
61.BR HUGE_VAL ,
62.BR HUGE_VALF ,
63.BR HUGE_VALL
64expand to constants of types double, float and long double, respectively,
65that represent a large positive value, possibly plus infinity.
2b2581ee
MK
66.SH "CONFORMING TO"
67C99
fea681da
MK
68.SH AVAILABILITY
69On a glibc system, the macro HUGE_VAL is always available.
70Availability of the NAN macro can be tested using
71.BR "#ifdef NAN" ,
72and similarly for INFINITY, HUGE_VALF, HUGE_VALL.
73They will be defined by
74.I <math.h>
75if _ISOC99_SOURCE or _GNU_SOURCE is defined, or __STDC_VERSION__ is defined
76and has a value not less than 199901L.
fea681da 77.SH "SEE ALSO"
0a90178c
MK
78.BR fpclassify (3),
79.BR feature_test_macros (7)