OSDN Git Service

(split) LDP: Update original to LDP v3.50.
[linuxjm/LDP_man-pages.git] / original / man3 / infnan.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
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.
12 .\"
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.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
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)
30 .\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB
31 .\"     to note that this function is not available in glibc2.
32 .\"
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
43 Link with \fI\-lm\fP.
44 .SH DESCRIPTION
45 The
46 .BR infnan ()
47 function returns a suitable value for infinity and
48 "not-a-number" (NaN) results.
49 The value of \fIerror\fP can be
50 .B ERANGE
51 to represent infinity or anything else to represent NaN.
52 \fIerrno\fP
53 is also set.
54 .SH RETURN VALUE
55 If \fIerror\fP is
56 .B ERANGE
57 (Infinity),
58 .B HUGE_VAL
59 is returned.
60 .PP
61 If \fIerror\fP is \-\fBERANGE\fP (\-Infinity), \-\fBHUGE_VAL\fP is returned.
62 .PP
63 If \fIerror\fP is anything else, NAN is returned.
64 .SH ERRORS
65 .TP
66 .B EDOM
67 The value of \fIerror\fP is "not-a-number" (NaN).
68 .TP
69 .B ERANGE
70 The value of \fIerror\fP is positive infinity or negative infinity.
71 .SH CONFORMING TO
72 4.3BSD.
73 .SH NOTES
74 This obsolete function was provided in
75 libc4 and libc5, but is not available in glibc2.