]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
c13182ef | 12 | .\" |
fea681da MK |
13 | .\" Since the Linux kernel and libraries are constantly changing, this |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" References consulted: | |
26 | .\" Linux libc source code | |
27 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
28 | .\" 386BSD man pages | |
29 | .\" Modified Sat Jul 24 19:11:11 1993 by Rik Faith (faith@cs.unc.edu) | |
94426bbf MK |
30 | .\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB |
31 | .\" to note that this function is not available in glibc2. | |
32 | .\" | |
fea681da MK |
33 | .TH INFNAN 3 1993-06-02 "GNU" "Linux Programmer's Manual" |
34 | .SH NAME | |
35 | infnan \- deal with infinite or not-a-number (NaN) result | |
36 | .SH SYNOPSIS | |
37 | .nf | |
38 | .B #include <math.h> | |
39 | .sp | |
40 | .BI "double infnan(int " error ); | |
41 | .fi | |
42 | .sp | |
20c58d70 | 43 | Link with \fI\-lm\fP. |
fea681da | 44 | .SH DESCRIPTION |
60a90ecd MK |
45 | The |
46 | .BR infnan () | |
47 | function returns a suitable value for infinity and | |
c13182ef | 48 | "not-a-number" (NaN) results. |
35cfd378 MK |
49 | The value of |
50 | .I error | |
51 | can be | |
a9b4ebbc | 52 | .B ERANGE |
be7fff26 | 53 | to represent infinity or anything else to represent NaN. |
35cfd378 | 54 | .I errno |
fea681da | 55 | is also set. |
47297adb | 56 | .SH RETURN VALUE |
35cfd378 MK |
57 | If |
58 | .I error | |
59 | is | |
a9b4ebbc MK |
60 | .B ERANGE |
61 | (Infinity), | |
62 | .B HUGE_VAL | |
63 | is returned. | |
fea681da | 64 | .PP |
35cfd378 MK |
65 | If |
66 | .I error | |
51700fd7 | 67 | is |
c9942389 MK |
68 | .RB \- ERANGE |
69 | (\-Infinity), | |
70 | .RB \- HUGE_VAL | |
71 | is returned. | |
fea681da | 72 | .PP |
35cfd378 MK |
73 | If |
74 | .I error | |
75 | is anything else, NAN is returned. | |
fea681da MK |
76 | .SH ERRORS |
77 | .TP | |
78 | .B EDOM | |
35cfd378 MK |
79 | The value of |
80 | .I error | |
81 | is "not-a-number" (NaN). | |
fea681da MK |
82 | .TP |
83 | .B ERANGE | |
35cfd378 MK |
84 | The value of |
85 | .I error | |
86 | is positive infinity or negative infinity. | |
47297adb | 87 | .SH CONFORMING TO |
44a2c328 | 88 | 4.3BSD. |
2b2581ee MK |
89 | .SH NOTES |
90 | This obsolete function was provided in | |
aeb76cd4 | 91 | libc4 and libc5, but is not available in glibc2. |