Blob


1 <head>
2 <title>nan(3) - Plan 9 from User Space</title>
3 <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
4 </head>
5 <body bgcolor=#ffffff>
6 <table border=0 cellpadding=0 cellspacing=0 width=100%>
7 <tr height=10><td>
8 <tr><td width=20><td>
9 <tr><td width=20><td><b>NAN(3)</b><td align=right><b>NAN(3)</b>
10 <tr><td width=20><td colspan=2>
11 <br>
12 <p><font size=+1><b>NAME </b></font><br>
14 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
16 NaN, Inf, isNaN, isInf &ndash; not-a-number and infinity functions<br>
18 </table>
19 <p><font size=+1><b>SYNOPSIS </b></font><br>
21 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
23 <tt><font size=+1>#include &lt;u.h&gt;<br>
24 #include &lt;libc.h&gt;
25 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
26 </font></tt>
27 <tt><font size=+1>double NaN(void)
28 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
29 </font></tt>
30 <tt><font size=+1>double Inf(int)
31 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
32 </font></tt>
33 <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isNaN(double)
34 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
35 </font></tt>
36 <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isInf(double, int)<br>
37 </font></tt>
38 </table>
39 <p><font size=+1><b>DESCRIPTION </b></font><br>
41 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
43 The IEEE floating point standard defines values called &#8216;not-a-number&#8217;
44 and positive and negative &#8216;infinity&#8217;. These values can be produced
45 by such things as overflow and division by zero. Also, the library
46 functions sometimes return them when the arguments are not in
47 the domain, or the result is out of range.
48 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
50 <i>NaN</i> returns a double that is not-a-number. <i>IsNaN</i> returns true
51 if its argument is not-a-number.
52 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
54 <i>Inf</i>(<i>i</i>) returns positive infinity if <i>i</i> is greater than or equal
55 to zero, else negative infinity. <i>IsInf</i> returns true if its first
56 argument is infinity with the same sign as the second argument.<br>
58 </table>
59 <p><font size=+1><b>SOURCE </b></font><br>
61 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
63 <tt><font size=+1>/usr/local/plan9/src/lib9/nan.c<br>
64 </font></tt>
65 </table>
67 <td width=20>
68 <tr height=20><td>
69 </table>
70 <!-- TRAILER -->
71 <table border=0 cellpadding=0 cellspacing=0 width=100%>
72 <tr height=15><td width=10><td><td width=10>
73 <tr><td><td>
74 <center>
75 <a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
76 </center>
77 </table>
78 <!-- TRAILER -->
79 </body></html>