diff options
| author | Jeff Johnston <jjohnstn@redhat.com> | 2003-05-02 19:28:40 +0000 | 
|---|---|---|
| committer | Jeff Johnston <jjohnstn@redhat.com> | 2003-05-02 19:28:40 +0000 | 
| commit | 3da4f434ddf94259eca6d5f3a7a2a07026a465fd (patch) | |
| tree | aa944d0d84d27569ff0ec56bac8120072d8ce392 /libm.html | |
| parent | 2003-02-03 Jeff Johnston <jjohnstn@redhat.com> (diff) | |
2003-05-02 Jeff Johnston <jjohnstn@redhat.com>
 * COPYING.NEWLIB: New file from up to date sources. * info.html: Updated to use COPYING.NEWLIB. * README: Updated to 1.11.0. * libc.html: Ditto. * libc_toc.html: Ditto. * libm.html: Ditto. * libm_toc.html: Ditto. 
Diffstat (limited to 'libm.html')
| -rw-r--r-- | libm.html | 2723 | 
1 files changed, 1403 insertions, 1320 deletions
| @@ -1,75 +1,82 @@ | |||
| 1 | <HTML> | 1 | <HTML> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
| 3 | <!-- Created on May, 2 2003 by texi2html 1.64 --> | ||
| 4 | <!-- | ||
| 5 | Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) | ||
| 6 | Karl Berry <karl@freefriends.org> | ||
| 7 | Olaf Bachmann <obachman@mathematik.uni-kl.de> | ||
| 8 | and many others. | ||
| 9 | Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de> | ||
| 10 | Send bugs and suggestions to <texi2html@mathematik.uni-kl.de> | ||
| 11 | |||
| 12 | --> | ||
| 2 | <HEAD> | 13 | <HEAD> | 
| 3 | <!-- Created by texi2html 1.56k from /home/fitzsim/sources/src-newlib-devel/src/newlib/libm/libm.texinfo on 21 July 2002 --> | 14 | <TITLE>The Red Hat newlib C Math Library: </TITLE> | 
| 4 | 15 | ||
| 5 | <TITLE>The Red Hat newlib C Math Library</TITLE> | 16 | <META NAME="description" CONTENT="The Red Hat newlib C Math Library: "> | 
| 6 | </HEAD> | 17 | <META NAME="keywords" CONTENT="The Red Hat newlib C Math Library: "> | 
| 7 | <BODY> | 18 | <META NAME="resource-type" CONTENT="document"> | 
| 8 | <H1>The Red Hat newlib C Math Library</H1> | 19 | <META NAME="distribution" CONTENT="global"> | 
| 9 | <H2><CODE>libm</CODE> 1.10.0</H2> | 20 | <META NAME="Generator" CONTENT="texi2html 1.64"> | 
| 10 | <H2>July 2002</H2> | ||
| 11 | <ADDRESS>{Steve Chamberlain}</ADDRESS> | ||
| 12 | <ADDRESS>{Roland Pesch}</ADDRESS> | ||
| 13 | <ADDRESS>{Red Hat Support}</ADDRESS> | ||
| 14 | <ADDRESS>{Jeff Johnston}</ADDRESS> | ||
| 15 | <P> | ||
| 16 | <P><HR><P> | ||
| 17 | |||
| 18 | <P> | ||
| 19 | Copyright (C) 1992, 1993, 1994-2002 Red Hat, Inc. | ||
| 20 | |||
| 21 | |||
| 22 | <P> | ||
| 23 | <TT>`libm'</TT> includes software developed at SunPro, a Sun Microsystems, | ||
| 24 | Inc. business. Permission to use, copy, modify, and distribute this | ||
| 25 | software is freely granted, provided that this notice is preserved. | ||
| 26 | |||
| 27 | |||
| 28 | <P> | ||
| 29 | Permission is granted to make and distribute verbatim copies of | ||
| 30 | this manual provided the copyright notice and this permission notice | ||
| 31 | are preserved on all copies. | ||
| 32 | |||
| 33 | |||
| 34 | <P> | ||
| 35 | Permission is granted to copy and distribute modified versions of this | ||
| 36 | manual under the conditions for verbatim copying, subject to the terms | ||
| 37 | of the GNU General Public License, which includes the provision that the | ||
| 38 | entire resulting derived work is distributed under the terms of a | ||
| 39 | permission notice identical to this one. | ||
| 40 | 21 | ||
| 22 | </HEAD> | ||
| 41 | 23 | ||
| 24 | <BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"> | ||
| 25 | <h1>The Red Hat newlib C Math Library: </h1> | ||
| 26 | <h2>Full Configuration</h2> | ||
| 27 | <h2><code>libm</code> 1.11.0</h2> | ||
| 28 | <h2>May, 2 2003 </h2> | ||
| 29 | <address>{Steve Chamberlain}</address> | ||
| 30 | <address>{Roland Pesch}</address> | ||
| 31 | <address>{Red Hat Support}</address> | ||
| 32 | <address>{Jeff Johnston}</address> | ||
| 33 | <p> | ||
| 34 | <p><hr><p> | ||
| 35 | <A NAME="SEC1"></A> | ||
| 36 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
| 37 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> < </A>]</TD> | ||
| 38 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC2"> > </A>]</TD> | ||
| 39 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 40 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 41 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 42 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 43 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 44 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 45 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 46 | </TR></TABLE> | ||
| 47 | <P> | ||
| 48 | |||
| 49 | <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> | ||
| 50 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC1">1. Mathematical Functions (<TT>`math.h'</TT>)</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">The mathematical functions (`math.h').</TD></TR> | ||
| 51 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC42">2. Reentrancy Properties of <CODE>libm</CODE></A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">The functions in libm are not reentrant by default.</TD></TR> | ||
| 52 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC43">Index</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> | ||
| 53 | </TABLE></BLOCKQUOTE> | ||
| 54 | <P> | ||
| 55 | |||
| 56 | <A NAME="Math"></A> | ||
| 57 | <H1> 1. Mathematical Functions (<TT>`math.h'</TT>) </H1> | ||
| 58 | <!--docid::SEC1::--> | ||
| 42 | <P> | 59 | <P> | 
| 43 | Permission is granted to copy and distribute translations of this manual | ||
| 44 | into another language, under the above conditions for modified versions. | ||
| 45 | |||
| 46 | |||
| 47 | |||
| 48 | 60 | ||
| 49 | <H1><A NAME="SEC1" HREF="libm_toc.html#TOC1">Mathematical Functions (<TT>`math.h'</TT>)</A></H1> | ||
| 50 | |||
| 51 | <P> | ||
| 52 | This chapter groups a wide variety of mathematical functions. The | 61 | This chapter groups a wide variety of mathematical functions. The | 
| 53 | corresponding definitions and declarations are in <TT>`math.h'</TT>. | 62 | corresponding definitions and declarations are in <TT>`math.h'</TT>. | 
| 54 | Two definitions from <TT>`math.h'</TT> are of particular interest. | 63 | Two definitions from <TT>`math.h'</TT> are of particular interest. | 
| 55 | 64 | </P><P> | |
| 56 | |||
| 57 | 65 | ||
| 58 | <OL> | 66 | <OL> | 
| 59 | <LI> | 67 | <LI> | 
| 60 | |||
| 61 | The representation of infinity as a <CODE>double</CODE> is defined as | 68 | The representation of infinity as a <CODE>double</CODE> is defined as | 
| 62 | <CODE>HUGE_VAL</CODE>; this number is returned on overflow by many functions. | 69 | <CODE>HUGE_VAL</CODE>; this number is returned on overflow by many functions. | 
| 70 | <P> | ||
| 63 | 71 | ||
| 64 | <LI> | 72 | <LI> | 
| 65 | |||
| 66 | The structure <CODE>exception</CODE> is used when you write customized error | 73 | The structure <CODE>exception</CODE> is used when you write customized error | 
| 67 | handlers for the mathematical functions. You can customize error | 74 | handlers for the mathematical functions. You can customize error | 
| 68 | handling for most of these functions by defining your own version of | 75 | handling for most of these functions by defining your own version of | 
| 69 | <CODE>matherr</CODE>; see the section on <CODE>matherr</CODE> for details. | 76 | <CODE>matherr</CODE>; see the section on <CODE>matherr</CODE> for details. | 
| 70 | </OL> | 77 | </OL> | 
| 71 | |||
| 72 | <P> | 78 | <P> | 
| 79 | |||
| 73 | <A NAME="IDX1"></A> | 80 | <A NAME="IDX1"></A> | 
| 74 | <A NAME="IDX2"></A> | 81 | <A NAME="IDX2"></A> | 
| 75 | <A NAME="IDX3"></A> | 82 | <A NAME="IDX3"></A> | 
| @@ -81,21 +88,77 @@ of OS subroutines as <CODE>fputs</CODE>: <CODE>close</CODE>, <CODE>fstat</CODE>, | |||
| 81 | See section `System Calls' in <CITE>The Cygnus C Support Library</CITE>, | 88 | See section `System Calls' in <CITE>The Cygnus C Support Library</CITE>, | 
| 82 | for a discussion and for sample minimal implementations of these support | 89 | for a discussion and for sample minimal implementations of these support | 
| 83 | subroutines. | 90 | subroutines. | 
| 91 | </P><P> | ||
| 84 | 92 | ||
| 85 | |||
| 86 | <P> | ||
| 87 | Alternative declarations of the mathematical functions, which exploit | 93 | Alternative declarations of the mathematical functions, which exploit | 
| 88 | specific machine capabilities to operate faster--but generally have | 94 | specific machine capabilities to operate faster--but generally have | 
| 89 | less error checking and may reflect additional limitations on some | 95 | less error checking and may reflect additional limitations on some | 
| 90 | machines--are available when you include <TT>`fastmath.h'</TT> instead of | 96 | machines--are available when you include <TT>`fastmath.h'</TT> instead of | 
| 91 | <TT>`math.h'</TT>. | 97 | <TT>`math.h'</TT>. | 
| 92 | 98 | </P><P> | |
| 93 | 99 | ||
| 94 | 100 | <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> | |
| 95 | 101 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC2">1.1 Version of library</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> | |
| 96 | <H2><A NAME="SEC2" HREF="libm_toc.html#TOC2">Version of library</A></H2> | 102 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC3">1.2 <CODE>acos</CODE>, <CODE>acosf</CODE>---arc cosine</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Arccosine</TD></TR> | 
| 97 | 103 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC4">1.3 <CODE>acosh</CODE>, <CODE>acoshf</CODE>---inverse hyperbolic cosine</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Inverse hyperbolic cosine</TD></TR> | |
| 104 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC5">1.4 <CODE>asin</CODE>, <CODE>asinf</CODE>---arc sine</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Arcsine</TD></TR> | ||
| 105 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC6">1.5 <CODE>asinh</CODE>, <CODE>asinhf</CODE>---inverse hyperbolic sine</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Inverse hyperbolic sine</TD></TR> | ||
| 106 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC7">1.6 <CODE>atan</CODE>, <CODE>atanf</CODE>---arc tangent</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Arctangent</TD></TR> | ||
| 107 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC8">1.7 <CODE>atan2</CODE>, <CODE>atan2f</CODE>---arc tangent of y/x</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Arctangent of y/x</TD></TR> | ||
| 108 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC9">1.8 <CODE>atanh</CODE>, <CODE>atanhf</CODE>---inverse hyperbolic tangent</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Inverse hyperbolic tangent</TD></TR> | ||
| 109 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Bessel functions (jN, yN)</TD></TR> | ||
| 110 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC31">1.30 <CODE>cbrt</CODE>, <CODE>cbrtf</CODE>---cube root</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Cube root</TD></TR> | ||
| 111 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC32">1.31 <CODE>copysign</CODE>, <CODE>copysignf</CODE>---sign of <VAR>y</VAR>, magnitude of <VAR>x</VAR></A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Sign of Y, magnitude of X</TD></TR> | ||
| 112 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC11">1.10 <CODE>cosh</CODE>, <CODE>coshf</CODE>---hyperbolic cosine</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Hyperbolic cosine</TD></TR> | ||
| 113 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC12">1.11 <CODE>erf</CODE>, <CODE>erff</CODE>, <CODE>erfc</CODE>, <CODE>erfcf</CODE>---error function</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Error function (erf, erfc)</TD></TR> | ||
| 114 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC13">1.12 <CODE>exp</CODE>, <CODE>expf</CODE>---exponential</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Exponential</TD></TR> | ||
| 115 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC33">1.32 <CODE>expm1</CODE>, <CODE>expm1f</CODE>---exponential minus 1</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Exponential of x, - 1</TD></TR> | ||
| 116 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC14">1.13 <CODE>fabs</CODE>, <CODE>fabsf</CODE>---absolute value (magnitude)</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Absolute value (magnitude)</TD></TR> | ||
| 117 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC15">1.14 <CODE>floor</CODE>, <CODE>floorf</CODE>, <CODE>ceil</CODE>, <CODE>ceilf</CODE>---floor and ceiling</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Floor and ceiling (floor, ceil)</TD></TR> | ||
| 118 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC16">1.15 <CODE>fmod</CODE>, <CODE>fmodf</CODE>---floating-point remainder (modulo)</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Floating-point remainder (modulo)</TD></TR> | ||
| 119 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC17">1.16 <CODE>frexp</CODE>, <CODE>frexpf</CODE>---split floating-point number</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Split floating-point number</TD></TR> | ||
| 120 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC18">1.17 <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>,</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Logarithmic gamma function</TD></TR> | ||
| 121 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC19">1.18 <CODE>hypot</CODE>, <CODE>hypotf</CODE>---distance from origin</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Distance from origin</TD></TR> | ||
| 122 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC34">1.33 <CODE>ilogb</CODE>, <CODE>ilogbf</CODE>---get exponent of floating point number</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Get exponent</TD></TR> | ||
| 123 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC35">1.34 <CODE>infinity</CODE>, <CODE>infinityf</CODE>---representation of infinity</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Floating infinity</TD></TR> | ||
| 124 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC20">1.19 <CODE>isnan</CODE>,<CODE>isnanf</CODE>,<CODE>isinf</CODE>,<CODE>isinff</CODE>,<CODE>finite</CODE>,<CODE>finitef</CODE>---test for exceptional numbers</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Check type of number</TD></TR> | ||
| 125 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC21">1.20 <CODE>ldexp</CODE>, <CODE>ldexpf</CODE>---load exponent</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Load exponent</TD></TR> | ||
| 126 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC22">1.21 <CODE>log</CODE>, <CODE>logf</CODE>---natural logarithms</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Natural logarithms</TD></TR> | ||
| 127 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC23">1.22 <CODE>log10</CODE>, <CODE>log10f</CODE>---base 10 logarithms</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Base 10 logarithms</TD></TR> | ||
| 128 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC36">1.35 <CODE>log1p</CODE>, <CODE>log1pf</CODE>---log of <CODE>1 + <VAR>x</VAR></CODE></A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Log of 1 + X</TD></TR> | ||
| 129 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC37">1.36 <CODE>matherr</CODE>---modifiable math error handler</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Modifiable math error handler</TD></TR> | ||
| 130 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC38">1.37 <CODE>modf</CODE>, <CODE>modff</CODE>---split fractional and integer parts</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Split fractional and integer parts</TD></TR> | ||
| 131 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC39">1.38 <CODE>nan</CODE>, <CODE>nanf</CODE>---representation of infinity</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Floating Not a Number</TD></TR> | ||
| 132 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC40">1.39 <CODE>nextafter</CODE>, <CODE>nextafterf</CODE>---get next number</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Get next representable number</TD></TR> | ||
| 133 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC24">1.23 <CODE>pow</CODE>, <CODE>powf</CODE>---x to the power y</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">X to the power Y</TD></TR> | ||
| 134 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC25">1.24 <CODE>remainder</CODE>, <CODE>remainderf</CODE>---round and remainder</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">remainder of X divided by Y</TD></TR> | ||
| 135 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC41">1.40 <CODE>scalbn</CODE>, <CODE>scalbnf</CODE>---scale by integer</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">scalbn</TD></TR> | ||
| 136 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC27">1.26 <CODE>sin</CODE>, <CODE>sinf</CODE>, <CODE>cos</CODE>, <CODE>cosf</CODE>---sine or cosine</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Sine or cosine (sin, cos)</TD></TR> | ||
| 137 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC28">1.27 <CODE>sinh</CODE>, <CODE>sinhf</CODE>---hyperbolic sine</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Hyperbolic sine</TD></TR> | ||
| 138 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC26">1.25 <CODE>sqrt</CODE>, <CODE>sqrtf</CODE>---positive square root</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Positive square root</TD></TR> | ||
| 139 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC29">1.28 <CODE>tan</CODE>, <CODE>tanf</CODE>---tangent</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Tangent</TD></TR> | ||
| 140 | <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="libm.html#SEC30">1.29 <CODE>tanh</CODE>, <CODE>tanhf</CODE>---hyperbolic tangent</A></TD><TD>  </TD><TD ALIGN="left" VALIGN="TOP">Hyperbolic tangent</TD></TR> | ||
| 141 | </TABLE></BLOCKQUOTE> | ||
| 142 | <P> | ||
| 143 | |||
| 144 | <A NAME="version"></A> | ||
| 145 | <HR SIZE="6"> | ||
| 146 | <A NAME="SEC2"></A> | ||
| 147 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
| 148 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> < </A>]</TD> | ||
| 149 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC3"> > </A>]</TD> | ||
| 150 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 151 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 152 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 153 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 154 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 155 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 156 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 157 | </TR></TABLE> | ||
| 158 | <H2> 1.1 Version of library </H2> | ||
| 159 | <!--docid::SEC2::--> | ||
| 98 | <P> | 160 | <P> | 
| 161 | |||
| 99 | There are four different versions of the math library routines: IEEE, | 162 | There are four different versions of the math library routines: IEEE, | 
| 100 | POSIX, X/Open, or SVID. The version may be selected at runtime by | 163 | POSIX, X/Open, or SVID. The version may be selected at runtime by | 
| 101 | setting the global variable <CODE>_LIB_VERSION</CODE>, defined in | 164 | setting the global variable <CODE>_LIB_VERSION</CODE>, defined in | 
| @@ -103,412 +166,395 @@ setting the global variable <CODE>_LIB_VERSION</CODE>, defined in | |||
| 103 | in <TT>`math.h'</TT>: <CODE>_IEEE_</CODE>, <CODE>_POSIX_</CODE>, <CODE>_XOPEN_</CODE>, or | 166 | in <TT>`math.h'</TT>: <CODE>_IEEE_</CODE>, <CODE>_POSIX_</CODE>, <CODE>_XOPEN_</CODE>, or | 
| 104 | <CODE>_SVID_</CODE>. The <CODE>_LIB_VERSION</CODE> variable is not specific to any | 167 | <CODE>_SVID_</CODE>. The <CODE>_LIB_VERSION</CODE> variable is not specific to any | 
| 105 | thread, and changing it will affect all threads. | 168 | thread, and changing it will affect all threads. | 
| 169 | </P><P> | ||
| 106 | 170 | ||
| 107 | |||
| 108 | <P> | ||
| 109 | The versions of the library differ only in how errors are handled. | 171 | The versions of the library differ only in how errors are handled. | 
| 172 | </P><P> | ||
| 110 | 173 | ||
| 111 | |||
| 112 | <P> | ||
| 113 | In IEEE mode, the <CODE>matherr</CODE> function is never called, no warning | 174 | In IEEE mode, the <CODE>matherr</CODE> function is never called, no warning | 
| 114 | messages are printed, and <CODE>errno</CODE> is never set. | 175 | messages are printed, and <CODE>errno</CODE> is never set. | 
| 176 | </P><P> | ||
| 115 | 177 | ||
| 116 | |||
| 117 | <P> | ||
| 118 | In POSIX mode, <CODE>errno</CODE> is set correctly, but the <CODE>matherr</CODE> | 178 | In POSIX mode, <CODE>errno</CODE> is set correctly, but the <CODE>matherr</CODE> | 
| 119 | function is never called and no warning messages are printed. | 179 | function is never called and no warning messages are printed. | 
| 180 | </P><P> | ||
| 120 | 181 | ||
| 121 | |||
| 122 | <P> | ||
| 123 | In X/Open mode, <CODE>errno</CODE> is set correctly, and <CODE>matherr</CODE> is | 182 | In X/Open mode, <CODE>errno</CODE> is set correctly, and <CODE>matherr</CODE> is | 
| 124 | called, but warning message are not printed. | 183 | called, but warning message are not printed. | 
| 184 | </P><P> | ||
| 125 | 185 | ||
| 126 | |||
| 127 | <P> | ||
| 128 | In SVID mode, functions which overflow return 3.40282346638528860e+38, | 186 | In SVID mode, functions which overflow return 3.40282346638528860e+38, | 
| 129 | the maximum single precision floating point value, rather than infinity. | 187 | the maximum single precision floating point value, rather than infinity. | 
| 130 | Also, <CODE>errno</CODE> is set correctly, <CODE>matherr</CODE> is called, and, if | 188 | Also, <CODE>errno</CODE> is set correctly, <CODE>matherr</CODE> is called, and, if | 
| 131 | <CODE>matherr</CODE> returns 0, warning messages are printed for some errors. | 189 | <CODE>matherr</CODE> returns 0, warning messages are printed for some errors. | 
| 132 | For example, by default <SAMP>`log(-1.0)'</SAMP> writes this message on standard | 190 | For example, by default <SAMP>`log(-1.0)'</SAMP> writes this message on standard | 
| 133 | error output: | 191 | error output: | 
| 192 | </P><P> | ||
| 134 | 193 | ||
| 194 | <TABLE><tr><td> </td><td class=example><pre>log: DOMAIN error | ||
| 195 | </pre></td></tr></table></P><P> | ||
| 135 | 196 | ||
| 136 | |||
| 137 | <PRE> | ||
| 138 | log: DOMAIN error | ||
| 139 | </PRE> | ||
| 140 | |||
| 141 | <P> | ||
| 142 | The library is set to X/Open mode by default. | 197 | The library is set to X/Open mode by default. | 
| 143 | 198 | </P><P> | |
| 144 | 199 | ||
| 145 | 200 | <A NAME="acos"></A> | |
| 146 | 201 | <HR SIZE="6"> | |
| 147 | <H2><A NAME="SEC3" HREF="libm_toc.html#TOC3"><CODE>acos</CODE>, <CODE>acosf</CODE>---arc cosine</A></H2> | 202 | <A NAME="SEC3"></A> | 
| 148 | <P> | 203 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 149 | <A NAME="IDX5"></A> | 204 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC2"> < </A>]</TD> | 
| 150 | <A NAME="IDX6"></A> | 205 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC4"> > </A>]</TD> | 
| 206 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 207 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 208 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 209 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 210 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 211 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 212 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 213 | </TR></TABLE> | ||
| 214 | <H2> 1.2 <CODE>acos</CODE>, <CODE>acosf</CODE>---arc cosine </H2> | ||
| 215 | <!--docid::SEC3::--> | ||
| 151 | <STRONG>Synopsis</STRONG> | 216 | <STRONG>Synopsis</STRONG> | 
| 152 | 217 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 153 | <PRE> | ||
| 154 | #include <math.h> | ||
| 155 | double acos(double <VAR>x</VAR>); | 218 | double acos(double <VAR>x</VAR>); | 
| 156 | float acosf(float <VAR>x</VAR>); | 219 | float acosf(float <VAR>x</VAR>); | 
| 157 | 220 | ||
| 158 | </PRE> | 221 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 159 | |||
| 160 | <P> | 222 | <P> | 
| 161 | <STRONG>Description</STRONG><BR> | ||
| 162 | |||
| 163 | 223 | ||
| 164 | <P> | ||
| 165 | <CODE>acos</CODE> computes the inverse cosine (arc cosine) of the input value. | 224 | <CODE>acos</CODE> computes the inverse cosine (arc cosine) of the input value. | 
| 166 | Arguments to <CODE>acos</CODE> must be in the range -1 to 1. | 225 | Arguments to <CODE>acos</CODE> must be in the range -1 to 1. | 
| 226 | </P><P> | ||
| 167 | 227 | ||
| 168 | |||
| 169 | <P> | ||
| 170 | <CODE>acosf</CODE> is identical to <CODE>acos</CODE>, except that it performs | 228 | <CODE>acosf</CODE> is identical to <CODE>acos</CODE>, except that it performs | 
| 171 | its calculations on <CODE>floats</CODE>. | 229 | its calculations on <CODE>floats</CODE>. | 
| 230 | </P><P> | ||
| 172 | 231 | ||
| 173 | |||
| 174 | <P> | ||
| 175 | <BR> | 232 | <BR> | 
| 176 | <STRONG>Returns</STRONG><BR> | 233 | <STRONG>Returns</STRONG><BR> | 
| 234 | </P><P> | ||
| 177 | 235 | ||
| 178 | |||
| 179 | <P> | ||
| 180 | If <VAR>x</VAR> is not between -1 and 1, the returned value is NaN | 236 | If <VAR>x</VAR> is not between -1 and 1, the returned value is NaN | 
| 181 | (not a number) the global variable <CODE>errno</CODE> is set to <CODE>EDOM</CODE>, and a | 237 | (not a number) the global variable <CODE>errno</CODE> is set to <CODE>EDOM</CODE>, and a | 
| 182 | <CODE>DOMAIN error</CODE> message is sent as standard error output. | 238 | <CODE>DOMAIN error</CODE> message is sent as standard error output. | 
| 239 | </P><P> | ||
| 183 | 240 | ||
| 184 | |||
| 185 | <P> | ||
| 186 | You can modify error handling for these functions using <CODE>matherr</CODE>. | 241 | You can modify error handling for these functions using <CODE>matherr</CODE>. | 
| 187 | 242 | </P><P> | |
| 188 | 243 | ||
| 189 | <P> | 244 | <BR> | 
| 190 | <BR> | 245 | </P><P> | 
| 191 | 246 | ||
| 192 | 247 | <A NAME="acosh"></A> | |
| 193 | 248 | <HR SIZE="6"> | |
| 194 | 249 | <A NAME="SEC4"></A> | |
| 195 | <H2><A NAME="SEC4" HREF="libm_toc.html#TOC4"><CODE>acosh</CODE>, <CODE>acoshf</CODE>---inverse hyperbolic cosine</A></H2> | 250 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 196 | <P> | 251 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC3"> < </A>]</TD> | 
| 197 | <A NAME="IDX7"></A> | 252 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC5"> > </A>]</TD> | 
| 198 | <A NAME="IDX8"></A> | 253 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 254 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 255 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 256 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 257 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 258 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 259 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 260 | </TR></TABLE> | ||
| 261 | <H2> 1.3 <CODE>acosh</CODE>, <CODE>acoshf</CODE>---inverse hyperbolic cosine </H2> | ||
| 262 | <!--docid::SEC4::--> | ||
| 199 | <STRONG>Synopsis</STRONG> | 263 | <STRONG>Synopsis</STRONG> | 
| 200 | 264 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 201 | <PRE> | ||
| 202 | #include <math.h> | ||
| 203 | double acosh(double <VAR>x</VAR>); | 265 | double acosh(double <VAR>x</VAR>); | 
| 204 | float acoshf(float <VAR>x</VAR>); | 266 | float acoshf(float <VAR>x</VAR>); | 
| 205 | 267 | ||
| 206 | </PRE> | 268 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 207 | |||
| 208 | <P> | ||
| 209 | <STRONG>Description</STRONG><BR> | ||
| 210 | <CODE>acosh</CODE> calculates the inverse hyperbolic cosine of <VAR>x</VAR>. | 269 | <CODE>acosh</CODE> calculates the inverse hyperbolic cosine of <VAR>x</VAR>. | 
| 211 | <CODE>acosh</CODE> is defined as | 270 | <CODE>acosh</CODE> is defined as | 
| 212 | |||
| 213 | |||
| 214 | <P> | 271 | <P> | 
| 215 | <VAR>x</VAR> must be a number greater than or equal to 1. | ||
| 216 | 272 | ||
| 273 | <VAR>x</VAR> must be a number greater than or equal to 1. | ||
| 274 | </P><P> | ||
| 217 | 275 | ||
| 218 | <P> | ||
| 219 | <CODE>acoshf</CODE> is identical, other than taking and returning floats. | 276 | <CODE>acoshf</CODE> is identical, other than taking and returning floats. | 
| 277 | </P><P> | ||
| 220 | 278 | ||
| 221 | |||
| 222 | <P> | ||
| 223 | <BR> | 279 | <BR> | 
| 224 | <STRONG>Returns</STRONG><BR> | 280 | <STRONG>Returns</STRONG><BR> | 
| 225 | <CODE>acosh</CODE> and <CODE>acoshf</CODE> return the calculated value. If <VAR>x</VAR> | 281 | <CODE>acosh</CODE> and <CODE>acoshf</CODE> return the calculated value. If <VAR>x</VAR> | 
| 226 | less than 1, the return value is NaN and <CODE>errno</CODE> is set to <CODE>EDOM</CODE>. | 282 | less than 1, the return value is NaN and <CODE>errno</CODE> is set to <CODE>EDOM</CODE>. | 
| 283 | </P><P> | ||
| 227 | 284 | ||
| 228 | |||
| 229 | <P> | ||
| 230 | You can change the error-handling behavior with the non-ANSI | 285 | You can change the error-handling behavior with the non-ANSI | 
| 231 | <CODE>matherr</CODE> function. | 286 | <CODE>matherr</CODE> function. | 
| 287 | </P><P> | ||
| 232 | 288 | ||
| 233 | |||
| 234 | <P> | ||
| 235 | <BR> | 289 | <BR> | 
| 236 | <STRONG>Portability</STRONG><BR> | 290 | <STRONG>Portability</STRONG><BR> | 
| 237 | Neither <CODE>acosh</CODE> nor <CODE>acoshf</CODE> are ANSI C. They are not recommended | 291 | Neither <CODE>acosh</CODE> nor <CODE>acoshf</CODE> are ANSI C. They are not recommended | 
| 238 | for portable programs. | 292 | for portable programs. | 
| 239 | 293 | </P><P> | |
| 240 | 294 | ||
| 241 | <P> | 295 | <BR> | 
| 242 | <BR> | 296 | </P><P> | 
| 243 | 297 | ||
| 244 | 298 | <A NAME="asin"></A> | |
| 245 | 299 | <HR SIZE="6"> | |
| 246 | 300 | <A NAME="SEC5"></A> | |
| 247 | <H2><A NAME="SEC5" HREF="libm_toc.html#TOC5"><CODE>asin</CODE>, <CODE>asinf</CODE>---arc sine</A></H2> | 301 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 248 | <P> | 302 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC4"> < </A>]</TD> | 
| 249 | <A NAME="IDX9"></A> | 303 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC6"> > </A>]</TD> | 
| 250 | <A NAME="IDX10"></A> | 304 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 305 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 306 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 307 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 308 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 309 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 310 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 311 | </TR></TABLE> | ||
| 312 | <H2> 1.4 <CODE>asin</CODE>, <CODE>asinf</CODE>---arc sine </H2> | ||
| 313 | <!--docid::SEC5::--> | ||
| 251 | <STRONG>Synopsis</STRONG> | 314 | <STRONG>Synopsis</STRONG> | 
| 252 | 315 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 253 | <PRE> | ||
| 254 | #include <math.h> | ||
| 255 | double asin(double <VAR>x</VAR>); | 316 | double asin(double <VAR>x</VAR>); | 
| 256 | float asinf(float <VAR>x</VAR>); | 317 | float asinf(float <VAR>x</VAR>); | 
| 257 | 318 | ||
| 258 | </PRE> | 319 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 259 | |||
| 260 | <P> | 320 | <P> | 
| 261 | <STRONG>Description</STRONG><BR> | ||
| 262 | |||
| 263 | 321 | ||
| 264 | <P> | ||
| 265 | <CODE>asin</CODE> computes the inverse sine (arc sine) of the argument <VAR>x</VAR>. | 322 | <CODE>asin</CODE> computes the inverse sine (arc sine) of the argument <VAR>x</VAR>. | 
| 266 | Arguments to <CODE>asin</CODE> must be in the range -1 to 1. | 323 | Arguments to <CODE>asin</CODE> must be in the range -1 to 1. | 
| 324 | </P><P> | ||
| 267 | 325 | ||
| 268 | |||
| 269 | <P> | ||
| 270 | <CODE>asinf</CODE> is identical to <CODE>asin</CODE>, other than taking and | 326 | <CODE>asinf</CODE> is identical to <CODE>asin</CODE>, other than taking and | 
| 271 | returning floats. | 327 | returning floats. | 
| 328 | </P><P> | ||
| 272 | 329 | ||
| 273 | |||
| 274 | <P> | ||
| 275 | You can modify error handling for these routines using <CODE>matherr</CODE>. | 330 | You can modify error handling for these routines using <CODE>matherr</CODE>. | 
| 331 | </P><P> | ||
| 276 | 332 | ||
| 277 | |||
| 278 | <P> | ||
| 279 | <BR> | 333 | <BR> | 
| 280 | <STRONG>Returns</STRONG><BR> | 334 | <STRONG>Returns</STRONG><BR> | 
| 335 | </P><P> | ||
| 281 | 336 | ||
| 282 | |||
| 283 | <P> | ||
| 284 | If <VAR>x</VAR> is not in the range -1 to 1, <CODE>asin</CODE> and <CODE>asinf</CODE> | 337 | If <VAR>x</VAR> is not in the range -1 to 1, <CODE>asin</CODE> and <CODE>asinf</CODE> | 
| 285 | return NaN (not a number), set the global variable <CODE>errno</CODE> to | 338 | return NaN (not a number), set the global variable <CODE>errno</CODE> to | 
| 286 | <CODE>EDOM</CODE>, and issue a <CODE>DOMAIN error</CODE> message. | 339 | <CODE>EDOM</CODE>, and issue a <CODE>DOMAIN error</CODE> message. | 
| 340 | </P><P> | ||
| 287 | 341 | ||
| 288 | |||
| 289 | <P> | ||
| 290 | You can change this error treatment using <CODE>matherr</CODE>. | 342 | You can change this error treatment using <CODE>matherr</CODE>. | 
| 291 | 343 | </P><P> | |
| 292 | 344 | ||
| 293 | <P> | 345 | <BR> | 
| 294 | <BR> | 346 | </P><P> | 
| 295 | 347 | ||
| 296 | 348 | <A NAME="asinh"></A> | |
| 297 | 349 | <HR SIZE="6"> | |
| 298 | 350 | <A NAME="SEC6"></A> | |
| 299 | <H2><A NAME="SEC6" HREF="libm_toc.html#TOC6"><CODE>asinh</CODE>, <CODE>asinhf</CODE>---inverse hyperbolic sine</A></H2> | 351 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 300 | <P> | 352 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC5"> < </A>]</TD> | 
| 301 | <A NAME="IDX11"></A> | 353 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC7"> > </A>]</TD> | 
| 302 | <A NAME="IDX12"></A> | 354 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 355 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 356 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 357 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 358 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 359 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 360 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 361 | </TR></TABLE> | ||
| 362 | <H2> 1.5 <CODE>asinh</CODE>, <CODE>asinhf</CODE>---inverse hyperbolic sine </H2> | ||
| 363 | <!--docid::SEC6::--> | ||
| 303 | <STRONG>Synopsis</STRONG> | 364 | <STRONG>Synopsis</STRONG> | 
| 304 | 365 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 305 | <PRE> | ||
| 306 | #include <math.h> | ||
| 307 | double asinh(double <VAR>x</VAR>); | 366 | double asinh(double <VAR>x</VAR>); | 
| 308 | float asinhf(float <VAR>x</VAR>); | 367 | float asinhf(float <VAR>x</VAR>); | 
| 309 | 368 | ||
| 310 | </PRE> | 369 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 311 | |||
| 312 | <P> | ||
| 313 | <STRONG>Description</STRONG><BR> | ||
| 314 | <CODE>asinh</CODE> calculates the inverse hyperbolic sine of <VAR>x</VAR>. | 370 | <CODE>asinh</CODE> calculates the inverse hyperbolic sine of <VAR>x</VAR>. | 
| 315 | <CODE>asinh</CODE> is defined as | 371 | <CODE>asinh</CODE> is defined as | 
| 316 | |||
| 317 | |||
| 318 | <P> | 372 | <P> | 
| 319 | <CODE>asinhf</CODE> is identical, other than taking and returning floats. | ||
| 320 | 373 | ||
| 374 | <CODE>asinhf</CODE> is identical, other than taking and returning floats. | ||
| 375 | </P><P> | ||
| 321 | 376 | ||
| 322 | <P> | ||
| 323 | <BR> | 377 | <BR> | 
| 324 | <STRONG>Returns</STRONG><BR> | 378 | <STRONG>Returns</STRONG><BR> | 
| 325 | <CODE>asinh</CODE> and <CODE>asinhf</CODE> return the calculated value. | 379 | <CODE>asinh</CODE> and <CODE>asinhf</CODE> return the calculated value. | 
| 380 | </P><P> | ||
| 326 | 381 | ||
| 327 | |||
| 328 | <P> | ||
| 329 | <BR> | 382 | <BR> | 
| 330 | <STRONG>Portability</STRONG><BR> | 383 | <STRONG>Portability</STRONG><BR> | 
| 331 | Neither <CODE>asinh</CODE> nor <CODE>asinhf</CODE> are ANSI C. | 384 | Neither <CODE>asinh</CODE> nor <CODE>asinhf</CODE> are ANSI C. | 
| 332 | 385 | </P><P> | |
| 333 | 386 | ||
| 334 | <P> | 387 | <BR> | 
| 335 | <BR> | 388 | </P><P> | 
| 336 | 389 | ||
| 337 | 390 | <A NAME="atan"></A> | |
| 338 | 391 | <HR SIZE="6"> | |
| 339 | 392 | <A NAME="SEC7"></A> | |
| 340 | <H2><A NAME="SEC7" HREF="libm_toc.html#TOC7"><CODE>atan</CODE>, <CODE>atanf</CODE>---arc tangent</A></H2> | 393 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 341 | <P> | 394 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC6"> < </A>]</TD> | 
| 342 | <A NAME="IDX13"></A> | 395 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC8"> > </A>]</TD> | 
| 343 | <A NAME="IDX14"></A> | 396 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 397 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 398 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 399 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 400 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 401 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 402 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 403 | </TR></TABLE> | ||
| 404 | <H2> 1.6 <CODE>atan</CODE>, <CODE>atanf</CODE>---arc tangent </H2> | ||
| 405 | <!--docid::SEC7::--> | ||
| 344 | <STRONG>Synopsis</STRONG> | 406 | <STRONG>Synopsis</STRONG> | 
| 345 | 407 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 346 | <PRE> | ||
| 347 | #include <math.h> | ||
| 348 | double atan(double <VAR>x</VAR>); | 408 | double atan(double <VAR>x</VAR>); | 
| 349 | float atanf(float <VAR>x</VAR>); | 409 | float atanf(float <VAR>x</VAR>); | 
| 350 | 410 | ||
| 351 | </PRE> | 411 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 352 | |||
| 353 | <P> | 412 | <P> | 
| 354 | <STRONG>Description</STRONG><BR> | ||
| 355 | |||
| 356 | 413 | ||
| 357 | <P> | ||
| 358 | <CODE>atan</CODE> computes the inverse tangent (arc tangent) of the input value. | 414 | <CODE>atan</CODE> computes the inverse tangent (arc tangent) of the input value. | 
| 415 | </P><P> | ||
| 359 | 416 | ||
| 360 | |||
| 361 | <P> | ||
| 362 | <CODE>atanf</CODE> is identical to <CODE>atan</CODE>, save that it operates on <CODE>floats</CODE>. | 417 | <CODE>atanf</CODE> is identical to <CODE>atan</CODE>, save that it operates on <CODE>floats</CODE>. | 
| 418 | </P><P> | ||
| 363 | 419 | ||
| 364 | |||
| 365 | <P> | ||
| 366 | <BR> | 420 | <BR> | 
| 367 | <STRONG>Returns</STRONG><BR> | 421 | <STRONG>Returns</STRONG><BR> | 
| 422 | </P><P> | ||
| 368 | 423 | ||
| 369 | |||
| 370 | <P> | ||
| 371 | <BR> | 424 | <BR> | 
| 372 | <STRONG>Portability</STRONG><BR> | 425 | <STRONG>Portability</STRONG><BR> | 
| 373 | <CODE>atan</CODE> is ANSI C. <CODE>atanf</CODE> is an extension. | 426 | <CODE>atan</CODE> is ANSI C. <CODE>atanf</CODE> is an extension. | 
| 374 | 427 | </P><P> | |
| 375 | 428 | ||
| 376 | <P> | 429 | <BR> | 
| 377 | <BR> | 430 | </P><P> | 
| 378 | 431 | ||
| 379 | 432 | <A NAME="atan2"></A> | |
| 380 | 433 | <HR SIZE="6"> | |
| 381 | 434 | <A NAME="SEC8"></A> | |
| 382 | <H2><A NAME="SEC8" HREF="libm_toc.html#TOC8"><CODE>atan2</CODE>, <CODE>atan2f</CODE>---arc tangent of y/x</A></H2> | 435 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 383 | <P> | 436 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC7"> < </A>]</TD> | 
| 384 | <A NAME="IDX15"></A> | 437 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC9"> > </A>]</TD> | 
| 385 | <A NAME="IDX16"></A> | 438 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 439 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 440 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 441 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 442 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 443 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 444 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 445 | </TR></TABLE> | ||
| 446 | <H2> 1.7 <CODE>atan2</CODE>, <CODE>atan2f</CODE>---arc tangent of y/x </H2> | ||
| 447 | <!--docid::SEC8::--> | ||
| 386 | <STRONG>Synopsis</STRONG> | 448 | <STRONG>Synopsis</STRONG> | 
| 387 | 449 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 388 | <PRE> | ||
| 389 | #include <math.h> | ||
| 390 | double atan2(double <VAR>y</VAR>,double <VAR>x</VAR>); | 450 | double atan2(double <VAR>y</VAR>,double <VAR>x</VAR>); | 
| 391 | float atan2f(float <VAR>y</VAR>,float <VAR>x</VAR>); | 451 | float atan2f(float <VAR>y</VAR>,float <VAR>x</VAR>); | 
| 392 | 452 | ||
| 393 | </PRE> | 453 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 394 | |||
| 395 | <P> | 454 | <P> | 
| 396 | <STRONG>Description</STRONG><BR> | ||
| 397 | |||
| 398 | 455 | ||
| 399 | <P> | ||
| 400 | <CODE>atan2</CODE> computes the inverse tangent (arc tangent) of <VAR>y</VAR>/<VAR>x</VAR>. | 456 | <CODE>atan2</CODE> computes the inverse tangent (arc tangent) of <VAR>y</VAR>/<VAR>x</VAR>. | 
| 401 | <CODE>atan2</CODE> produces the correct result even for angles near | 457 | <CODE>atan2</CODE> produces the correct result even for angles near | 
| 402 | (that is, when <VAR>x</VAR> is near 0). | 458 | (that is, when <VAR>x</VAR> is near 0). | 
| 459 | </P><P> | ||
| 403 | 460 | ||
| 404 | |||
| 405 | <P> | ||
| 406 | <CODE>atan2f</CODE> is identical to <CODE>atan2</CODE>, save that it takes and returns | 461 | <CODE>atan2f</CODE> is identical to <CODE>atan2</CODE>, save that it takes and returns | 
| 407 | <CODE>float</CODE>. | 462 | <CODE>float</CODE>. | 
| 463 | </P><P> | ||
| 408 | 464 | ||
| 409 | |||
| 410 | <P> | ||
| 411 | <BR> | 465 | <BR> | 
| 412 | <STRONG>Returns</STRONG><BR> | 466 | <STRONG>Returns</STRONG><BR> | 
| 413 | <CODE>atan2</CODE> and <CODE>atan2f</CODE> return a value in radians, in the range of | 467 | <CODE>atan2</CODE> and <CODE>atan2f</CODE> return a value in radians, in the range of | 
| 468 | </P><P> | ||
| 414 | 469 | ||
| 415 | |||
| 416 | <P> | ||
| 417 | If both <VAR>x</VAR> and <VAR>y</VAR> are 0.0, <CODE>atan2</CODE> causes a <CODE>DOMAIN</CODE> error. | 470 | If both <VAR>x</VAR> and <VAR>y</VAR> are 0.0, <CODE>atan2</CODE> causes a <CODE>DOMAIN</CODE> error. | 
| 471 | </P><P> | ||
| 418 | 472 | ||
| 419 | |||
| 420 | <P> | ||
| 421 | You can modify error handling for these functions using <CODE>matherr</CODE>. | 473 | You can modify error handling for these functions using <CODE>matherr</CODE>. | 
| 474 | </P><P> | ||
| 422 | 475 | ||
| 423 | |||
| 424 | <P> | ||
| 425 | <BR> | 476 | <BR> | 
| 426 | <STRONG>Portability</STRONG><BR> | 477 | <STRONG>Portability</STRONG><BR> | 
| 427 | <CODE>atan2</CODE> is ANSI C. <CODE>atan2f</CODE> is an extension. | 478 | <CODE>atan2</CODE> is ANSI C. <CODE>atan2f</CODE> is an extension. | 
| 428 | 479 | </P><P> | |
| 429 | 480 | ||
| 430 | <P> | 481 | <BR> | 
| 431 | <BR> | 482 | </P><P> | 
| 432 | 483 | ||
| 433 | 484 | <A NAME="atanh"></A> | |
| 434 | 485 | <HR SIZE="6"> | |
| 435 | 486 | <A NAME="SEC9"></A> | |
| 436 | <H2><A NAME="SEC9" HREF="libm_toc.html#TOC9"><CODE>atanh</CODE>, <CODE>atanhf</CODE>---inverse hyperbolic tangent</A></H2> | 487 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 437 | <P> | 488 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC8"> < </A>]</TD> | 
| 438 | <A NAME="IDX17"></A> | 489 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC10"> > </A>]</TD> | 
| 439 | <A NAME="IDX18"></A> | 490 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 491 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 492 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 493 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 494 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 495 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 496 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 497 | </TR></TABLE> | ||
| 498 | <H2> 1.8 <CODE>atanh</CODE>, <CODE>atanhf</CODE>---inverse hyperbolic tangent </H2> | ||
| 499 | <!--docid::SEC9::--> | ||
| 440 | <STRONG>Synopsis</STRONG> | 500 | <STRONG>Synopsis</STRONG> | 
| 441 | 501 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 442 | <PRE> | ||
| 443 | #include <math.h> | ||
| 444 | double atanh(double <VAR>x</VAR>); | 502 | double atanh(double <VAR>x</VAR>); | 
| 445 | float atanhf(float <VAR>x</VAR>); | 503 | float atanhf(float <VAR>x</VAR>); | 
| 446 | 504 | ||
| 447 | </PRE> | 505 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 448 | |||
| 449 | <P> | ||
| 450 | <STRONG>Description</STRONG><BR> | ||
| 451 | <CODE>atanh</CODE> calculates the inverse hyperbolic tangent of <VAR>x</VAR>. | 506 | <CODE>atanh</CODE> calculates the inverse hyperbolic tangent of <VAR>x</VAR>. | 
| 452 | |||
| 453 | |||
| 454 | <P> | 507 | <P> | 
| 508 | |||
| 455 | <CODE>atanhf</CODE> is identical, other than taking and returning | 509 | <CODE>atanhf</CODE> is identical, other than taking and returning | 
| 456 | <CODE>float</CODE> values. | 510 | <CODE>float</CODE> values. | 
| 511 | </P><P> | ||
| 457 | 512 | ||
| 458 | |||
| 459 | <P> | ||
| 460 | <BR> | 513 | <BR> | 
| 461 | <STRONG>Returns</STRONG><BR> | 514 | <STRONG>Returns</STRONG><BR> | 
| 462 | <CODE>atanh</CODE> and <CODE>atanhf</CODE> return the calculated value. | 515 | <CODE>atanh</CODE> and <CODE>atanhf</CODE> return the calculated value. | 
| 516 | </P><P> | ||
| 463 | 517 | ||
| 464 | |||
| 465 | <P> | ||
| 466 | If | 518 | If | 
| 467 | is greater than 1, the global <CODE>errno</CODE> is set to <CODE>EDOM</CODE> and | 519 | is greater than 1, the global <CODE>errno</CODE> is set to <CODE>EDOM</CODE> and | 
| 468 | the result is a NaN. A <CODE>DOMAIN error</CODE> is reported. | 520 | the result is a NaN. A <CODE>DOMAIN error</CODE> is reported. | 
| 521 | </P><P> | ||
| 469 | 522 | ||
| 470 | |||
| 471 | <P> | ||
| 472 | If | 523 | If | 
| 473 | is 1, the global <CODE>errno</CODE> is set to <CODE>EDOM</CODE>; and the result is | 524 | is 1, the global <CODE>errno</CODE> is set to <CODE>EDOM</CODE>; and the result is | 
| 474 | infinity with the same sign as <CODE>x</CODE>. A <CODE>SING error</CODE> is reported. | 525 | infinity with the same sign as <CODE>x</CODE>. A <CODE>SING error</CODE> is reported. | 
| 526 | </P><P> | ||
| 475 | 527 | ||
| 476 | |||
| 477 | <P> | ||
| 478 | You can modify the error handling for these routines using | 528 | You can modify the error handling for these routines using | 
| 479 | <CODE>matherr</CODE>. | 529 | <CODE>matherr</CODE>. | 
| 530 | </P><P> | ||
| 480 | 531 | ||
| 481 | |||
| 482 | <P> | ||
| 483 | <BR> | 532 | <BR> | 
| 484 | <STRONG>Portability</STRONG><BR> | 533 | <STRONG>Portability</STRONG><BR> | 
| 485 | Neither <CODE>atanh</CODE> nor <CODE>atanhf</CODE> are ANSI C. | 534 | Neither <CODE>atanh</CODE> nor <CODE>atanhf</CODE> are ANSI C. | 
| 486 | 535 | </P><P> | |
| 487 | 536 | ||
| 488 | <P> | 537 | <BR> | 
| 489 | <BR> | 538 | </P><P> | 
| 490 | 539 | ||
| 491 | 540 | <A NAME="jN"></A> | |
| 492 | 541 | <HR SIZE="6"> | |
| 493 | 542 | <A NAME="SEC10"></A> | |
| 494 | <H2><A NAME="SEC10" HREF="libm_toc.html#TOC10"><CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></H2> | 543 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 495 | <P> | 544 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC9"> < </A>]</TD> | 
| 496 | <A NAME="IDX19"></A> | 545 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC11"> > </A>]</TD> | 
| 497 | <A NAME="IDX20"></A> | 546 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 498 | <A NAME="IDX21"></A> | 547 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | 
| 499 | <A NAME="IDX22"></A> | 548 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | 
| 500 | <A NAME="IDX23"></A> | 549 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | 
| 501 | <A NAME="IDX24"></A> | 550 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | 
| 502 | <A NAME="IDX25"></A> | 551 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | 
| 503 | <A NAME="IDX26"></A> | 552 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | 
| 504 | <A NAME="IDX27"></A> | 553 | </TR></TABLE> | 
| 505 | <A NAME="IDX28"></A> | 554 | <H2> 1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions </H2> | 
| 506 | <A NAME="IDX29"></A> | 555 | <!--docid::SEC10::--> | 
| 507 | <A NAME="IDX30"></A> | ||
| 508 | <STRONG>Synopsis</STRONG> | 556 | <STRONG>Synopsis</STRONG> | 
| 509 | 557 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 510 | <PRE> | ||
| 511 | #include <math.h> | ||
| 512 | double j0(double <VAR>x</VAR>); | 558 | double j0(double <VAR>x</VAR>); | 
| 513 | float j0f(float <VAR>x</VAR>); | 559 | float j0f(float <VAR>x</VAR>); | 
| 514 | double j1(double <VAR>x</VAR>); | 560 | double j1(double <VAR>x</VAR>); | 
| @@ -522,395 +568,391 @@ float y1f(float <VAR>x</VAR>); | |||
| 522 | double yn(int <VAR>n</VAR>, double <VAR>x</VAR>); | 568 | double yn(int <VAR>n</VAR>, double <VAR>x</VAR>); | 
| 523 | float ynf(int <VAR>n</VAR>, float <VAR>x</VAR>); | 569 | float ynf(int <VAR>n</VAR>, float <VAR>x</VAR>); | 
| 524 | 570 | ||
| 525 | </PRE> | 571 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 526 | |||
| 527 | <P> | ||
| 528 | <STRONG>Description</STRONG><BR> | ||
| 529 | The Bessel functions are a family of functions that solve the | 572 | The Bessel functions are a family of functions that solve the | 
| 530 | differential equation | 573 | differential equation | 
| 531 | These functions have many applications in engineering and physics. | 574 | These functions have many applications in engineering and physics. | 
| 532 | |||
| 533 | |||
| 534 | <P> | 575 | <P> | 
| 576 | |||
| 535 | <CODE>jn</CODE> calculates the Bessel function of the first kind of order | 577 | <CODE>jn</CODE> calculates the Bessel function of the first kind of order | 
| 536 | <VAR>n</VAR>. <CODE>j0</CODE> and <CODE>j1</CODE> are special cases for order 0 and order | 578 | <VAR>n</VAR>. <CODE>j0</CODE> and <CODE>j1</CODE> are special cases for order 0 and order | 
| 537 | 1 respectively. | 579 | 1 respectively. | 
| 580 | </P><P> | ||
| 538 | 581 | ||
| 539 | |||
| 540 | <P> | ||
| 541 | Similarly, <CODE>yn</CODE> calculates the Bessel function of the second kind of | 582 | Similarly, <CODE>yn</CODE> calculates the Bessel function of the second kind of | 
| 542 | order <VAR>n</VAR>, and <CODE>y0</CODE> and <CODE>y1</CODE> are special cases for order 0 and | 583 | order <VAR>n</VAR>, and <CODE>y0</CODE> and <CODE>y1</CODE> are special cases for order 0 and | 
| 543 | 1. | 584 | 1. | 
| 585 | </P><P> | ||
| 544 | 586 | ||
| 545 | |||
| 546 | <P> | ||
| 547 | <CODE>jnf</CODE>, <CODE>j0f</CODE>, <CODE>j1f</CODE>, <CODE>ynf</CODE>, <CODE>y0f</CODE>, and <CODE>y1f</CODE> perform the | 587 | <CODE>jnf</CODE>, <CODE>j0f</CODE>, <CODE>j1f</CODE>, <CODE>ynf</CODE>, <CODE>y0f</CODE>, and <CODE>y1f</CODE> perform the | 
| 548 | same calculations, but on <CODE>float</CODE> rather than <CODE>double</CODE> values. | 588 | same calculations, but on <CODE>float</CODE> rather than <CODE>double</CODE> values. | 
| 589 | </P><P> | ||
| 549 | 590 | ||
| 550 | |||
| 551 | <P> | ||
| 552 | <BR> | 591 | <BR> | 
| 553 | <STRONG>Returns</STRONG><BR> | 592 | <STRONG>Returns</STRONG><BR> | 
| 554 | The value of each Bessel function at <VAR>x</VAR> is returned. | 593 | The value of each Bessel function at <VAR>x</VAR> is returned. | 
| 594 | </P><P> | ||
| 555 | 595 | ||
| 556 | |||
| 557 | <P> | ||
| 558 | <BR> | 596 | <BR> | 
| 559 | <STRONG>Portability</STRONG><BR> | 597 | <STRONG>Portability</STRONG><BR> | 
| 560 | None of the Bessel functions are in ANSI C. | 598 | None of the Bessel functions are in ANSI C. | 
| 561 | 599 | </P><P> | |
| 562 | 600 | ||
| 563 | <P> | 601 | <BR> | 
| 564 | <BR> | 602 | </P><P> | 
| 565 | 603 | ||
| 566 | 604 | <A NAME="cosh"></A> | |
| 567 | 605 | <HR SIZE="6"> | |
| 568 | 606 | <A NAME="SEC11"></A> | |
| 569 | <H2><A NAME="SEC11" HREF="libm_toc.html#TOC11"><CODE>cosh</CODE>, <CODE>coshf</CODE>---hyperbolic cosine</A></H2> | 607 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 570 | <P> | 608 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC10"> < </A>]</TD> | 
| 609 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC12"> > </A>]</TD> | ||
| 610 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 611 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 612 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 613 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 614 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 615 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 616 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 617 | </TR></TABLE> | ||
| 618 | <H2> 1.10 <CODE>cosh</CODE>, <CODE>coshf</CODE>---hyperbolic cosine </H2> | ||
| 619 | <!--docid::SEC11::--> | ||
| 571 | <STRONG>Synopsis</STRONG> | 620 | <STRONG>Synopsis</STRONG> | 
| 572 | 621 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 573 | <PRE> | ||
| 574 | #include <math.h> | ||
| 575 | double cosh(double <VAR>x</VAR>); | 622 | double cosh(double <VAR>x</VAR>); | 
| 576 | float coshf(float <VAR>x</VAR>) | 623 | float coshf(float <VAR>x</VAR>) | 
| 577 | 624 | ||
| 578 | </PRE> | 625 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 579 | |||
| 580 | <P> | 626 | <P> | 
| 581 | <STRONG>Description</STRONG><BR> | ||
| 582 | 627 | ||
| 583 | |||
| 584 | <P> | ||
| 585 | <CODE>cosh</CODE> computes the hyperbolic cosine of the argument <VAR>x</VAR>. | 628 | <CODE>cosh</CODE> computes the hyperbolic cosine of the argument <VAR>x</VAR>. | 
| 586 | <CODE>cosh(<VAR>x</VAR>)</CODE> is defined as | 629 | <CODE>cosh(<VAR>x</VAR>)</CODE> is defined as | 
| 630 | </P><P> | ||
| 587 | 631 | ||
| 588 | |||
| 589 | <P> | ||
| 590 | Angles are specified in radians. | 632 | Angles are specified in radians. | 
| 591 | <CODE>coshf</CODE> is identical, save that it takes and returns <CODE>float</CODE>. | 633 | <CODE>coshf</CODE> is identical, save that it takes and returns <CODE>float</CODE>. | 
| 634 | </P><P> | ||
| 592 | 635 | ||
| 593 | |||
| 594 | <P> | ||
| 595 | <BR> | 636 | <BR> | 
| 596 | <STRONG>Returns</STRONG><BR> | 637 | <STRONG>Returns</STRONG><BR> | 
| 597 | The computed value is returned. When the correct value would create | 638 | The computed value is returned. When the correct value would create | 
| 598 | an overflow, <CODE>cosh</CODE> returns the value <CODE>HUGE_VAL</CODE> with the | 639 | an overflow, <CODE>cosh</CODE> returns the value <CODE>HUGE_VAL</CODE> with the | 
| 599 | appropriate sign, and the global value <CODE>errno</CODE> is set to <CODE>ERANGE</CODE>. | 640 | appropriate sign, and the global value <CODE>errno</CODE> is set to <CODE>ERANGE</CODE>. | 
| 641 | </P><P> | ||
| 600 | 642 | ||
| 601 | |||
| 602 | <P> | ||
| 603 | You can modify error handling for these functions using the | 643 | You can modify error handling for these functions using the | 
| 604 | function <CODE>matherr</CODE>. | 644 | function <CODE>matherr</CODE>. | 
| 645 | </P><P> | ||
| 605 | 646 | ||
| 606 | |||
| 607 | <P> | ||
| 608 | <BR> | 647 | <BR> | 
| 609 | <STRONG>Portability</STRONG><BR> | 648 | <STRONG>Portability</STRONG><BR> | 
| 610 | <CODE>cosh</CODE> is ANSI. | 649 | <CODE>cosh</CODE> is ANSI. | 
| 611 | <CODE>coshf</CODE> is an extension. | 650 | <CODE>coshf</CODE> is an extension. | 
| 612 | 651 | </P><P> | |
| 613 | 652 | ||
| 614 | <P> | 653 | <BR> | 
| 615 | <BR> | 654 | </P><P> | 
| 616 | 655 | ||
| 617 | 656 | <A NAME="erf"></A> | |
| 618 | 657 | <HR SIZE="6"> | |
| 619 | 658 | <A NAME="SEC12"></A> | |
| 620 | <H2><A NAME="SEC12" HREF="libm_toc.html#TOC12"><CODE>erf</CODE>, <CODE>erff</CODE>, <CODE>erfc</CODE>, <CODE>erfcf</CODE>---error function</A></H2> | 659 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 621 | <P> | 660 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC11"> < </A>]</TD> | 
| 622 | <A NAME="IDX31"></A> | 661 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC13"> > </A>]</TD> | 
| 623 | <A NAME="IDX32"></A> | 662 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 624 | <A NAME="IDX33"></A> | 663 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | 
| 625 | <A NAME="IDX34"></A> | 664 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | 
| 665 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 666 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 667 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 668 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 669 | </TR></TABLE> | ||
| 670 | <H2> 1.11 <CODE>erf</CODE>, <CODE>erff</CODE>, <CODE>erfc</CODE>, <CODE>erfcf</CODE>---error function </H2> | ||
| 671 | <!--docid::SEC12::--> | ||
| 626 | <STRONG>Synopsis</STRONG> | 672 | <STRONG>Synopsis</STRONG> | 
| 627 | 673 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 628 | <PRE> | ||
| 629 | #include <math.h> | ||
| 630 | double erf(double <VAR>x</VAR>); | 674 | double erf(double <VAR>x</VAR>); | 
| 631 | float erff(float <VAR>x</VAR>); | 675 | float erff(float <VAR>x</VAR>); | 
| 632 | double erfc(double <VAR>x</VAR>); | 676 | double erfc(double <VAR>x</VAR>); | 
| 633 | float erfcf(float <VAR>x</VAR>); | 677 | float erfcf(float <VAR>x</VAR>); | 
| 634 | </PRE> | 678 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 635 | |||
| 636 | <P> | ||
| 637 | <STRONG>Description</STRONG><BR> | ||
| 638 | <CODE>erf</CODE> calculates an approximation to the "error function", | 679 | <CODE>erf</CODE> calculates an approximation to the "error function", | 
| 639 | which estimates the probability that an observation will fall within | 680 | which estimates the probability that an observation will fall within | 
| 640 | <VAR>x</VAR> standard deviations of the mean (assuming a normal | 681 | <VAR>x</VAR> standard deviations of the mean (assuming a normal | 
| 641 | distribution). | 682 | distribution). | 
| 642 | |||
| 643 | |||
| 644 | <P> | 683 | <P> | 
| 684 | |||
| 645 | <CODE>erfc</CODE> calculates the complementary probability; that is, | 685 | <CODE>erfc</CODE> calculates the complementary probability; that is, | 
| 646 | <CODE>erfc(<VAR>x</VAR>)</CODE> is <CODE>1 - erf(<VAR>x</VAR>)</CODE>. <CODE>erfc</CODE> is computed directly, | 686 | <CODE>erfc(<VAR>x</VAR>)</CODE> is <CODE>1 - erf(<VAR>x</VAR>)</CODE>. <CODE>erfc</CODE> is computed directly, | 
| 647 | so that you can use it to avoid the loss of precision that would | 687 | so that you can use it to avoid the loss of precision that would | 
| 648 | result from subtracting large probabilities (on large <VAR>x</VAR>) from 1. | 688 | result from subtracting large probabilities (on large <VAR>x</VAR>) from 1. | 
| 689 | </P><P> | ||
| 649 | 690 | ||
| 650 | |||
| 651 | <P> | ||
| 652 | <CODE>erff</CODE> and <CODE>erfcf</CODE> differ from <CODE>erf</CODE> and <CODE>erfc</CODE> only in the | 691 | <CODE>erff</CODE> and <CODE>erfcf</CODE> differ from <CODE>erf</CODE> and <CODE>erfc</CODE> only in the | 
| 653 | argument and result types. | 692 | argument and result types. | 
| 693 | </P><P> | ||
| 654 | 694 | ||
| 655 | |||
| 656 | <P> | ||
| 657 | <BR> | 695 | <BR> | 
| 658 | <STRONG>Returns</STRONG><BR> | 696 | <STRONG>Returns</STRONG><BR> | 
| 659 | For positive arguments, <CODE>erf</CODE> and all its variants return a | 697 | For positive arguments, <CODE>erf</CODE> and all its variants return a | 
| 660 | probability--a number between 0 and 1. | 698 | probability--a number between 0 and 1. | 
| 699 | </P><P> | ||
| 661 | 700 | ||
| 662 | |||
| 663 | <P> | ||
| 664 | <BR> | 701 | <BR> | 
| 665 | <STRONG>Portability</STRONG><BR> | 702 | <STRONG>Portability</STRONG><BR> | 
| 666 | None of the variants of <CODE>erf</CODE> are ANSI C. | 703 | None of the variants of <CODE>erf</CODE> are ANSI C. | 
| 667 | 704 | </P><P> | |
| 668 | 705 | ||
| 669 | <P> | 706 | <BR> | 
| 670 | <BR> | 707 | </P><P> | 
| 671 | 708 | ||
| 672 | 709 | <A NAME="exp"></A> | |
| 673 | 710 | <HR SIZE="6"> | |
| 674 | 711 | <A NAME="SEC13"></A> | |
| 675 | <H2><A NAME="SEC13" HREF="libm_toc.html#TOC13"><CODE>exp</CODE>, <CODE>expf</CODE>---exponential</A></H2> | 712 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 676 | <P> | 713 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC12"> < </A>]</TD> | 
| 677 | <A NAME="IDX35"></A> | 714 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC14"> > </A>]</TD> | 
| 678 | <A NAME="IDX36"></A> | 715 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 716 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 717 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 718 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 719 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 720 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 721 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 722 | </TR></TABLE> | ||
| 723 | <H2> 1.12 <CODE>exp</CODE>, <CODE>expf</CODE>---exponential </H2> | ||
| 724 | <!--docid::SEC13::--> | ||
| 679 | <STRONG>Synopsis</STRONG> | 725 | <STRONG>Synopsis</STRONG> | 
| 680 | 726 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 681 | <PRE> | ||
| 682 | #include <math.h> | ||
| 683 | double exp(double <VAR>x</VAR>); | 727 | double exp(double <VAR>x</VAR>); | 
| 684 | float expf(float <VAR>x</VAR>); | 728 | float expf(float <VAR>x</VAR>); | 
| 685 | 729 | ||
| 686 | </PRE> | 730 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 687 | |||
| 688 | <P> | ||
| 689 | <STRONG>Description</STRONG><BR> | ||
| 690 | <CODE>exp</CODE> and <CODE>expf</CODE> calculate the exponential of <VAR>x</VAR>, that is, | 731 | <CODE>exp</CODE> and <CODE>expf</CODE> calculate the exponential of <VAR>x</VAR>, that is, | 
| 691 | is the base of the natural system of logarithms, approximately 2.71828). | 732 | is the base of the natural system of logarithms, approximately 2.71828). | 
| 692 | |||
| 693 | |||
| 694 | <P> | 733 | <P> | 
| 734 | |||
| 695 | You can use the (non-ANSI) function <CODE>matherr</CODE> to specify | 735 | You can use the (non-ANSI) function <CODE>matherr</CODE> to specify | 
| 696 | error handling for these functions. | 736 | error handling for these functions. | 
| 737 | </P><P> | ||
| 697 | 738 | ||
| 698 | |||
| 699 | <P> | ||
| 700 | <BR> | 739 | <BR> | 
| 701 | <STRONG>Returns</STRONG><BR> | 740 | <STRONG>Returns</STRONG><BR> | 
| 702 | On success, <CODE>exp</CODE> and <CODE>expf</CODE> return the calculated value. | 741 | On success, <CODE>exp</CODE> and <CODE>expf</CODE> return the calculated value. | 
| 703 | If the result underflows, the returned value is <CODE>0</CODE>. If the | 742 | If the result underflows, the returned value is <CODE>0</CODE>. If the | 
| 704 | result overflows, the returned value is <CODE>HUGE_VAL</CODE>. In | 743 | result overflows, the returned value is <CODE>HUGE_VAL</CODE>. In | 
| 705 | either case, <CODE>errno</CODE> is set to <CODE>ERANGE</CODE>. | 744 | either case, <CODE>errno</CODE> is set to <CODE>ERANGE</CODE>. | 
| 745 | </P><P> | ||
| 706 | 746 | ||
| 707 | |||
| 708 | <P> | ||
| 709 | <BR> | 747 | <BR> | 
| 710 | <STRONG>Portability</STRONG><BR> | 748 | <STRONG>Portability</STRONG><BR> | 
| 711 | <CODE>exp</CODE> is ANSI C. <CODE>expf</CODE> is an extension. | 749 | <CODE>exp</CODE> is ANSI C. <CODE>expf</CODE> is an extension. | 
| 712 | 750 | </P><P> | |
| 713 | 751 | ||
| 714 | <P> | 752 | <BR> | 
| 715 | <BR> | 753 | </P><P> | 
| 716 | 754 | ||
| 717 | 755 | <A NAME="fabs"></A> | |
| 718 | 756 | <HR SIZE="6"> | |
| 719 | 757 | <A NAME="SEC14"></A> | |
| 720 | <H2><A NAME="SEC14" HREF="libm_toc.html#TOC14"><CODE>fabs</CODE>, <CODE>fabsf</CODE>---absolute value (magnitude)</A></H2> | 758 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 721 | <P> | 759 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC13"> < </A>]</TD> | 
| 722 | <A NAME="IDX37"></A> | 760 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC15"> > </A>]</TD> | 
| 723 | <A NAME="IDX38"></A> | 761 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 762 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 763 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 764 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 765 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 766 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 767 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 768 | </TR></TABLE> | ||
| 769 | <H2> 1.13 <CODE>fabs</CODE>, <CODE>fabsf</CODE>---absolute value (magnitude) </H2> | ||
| 770 | <!--docid::SEC14::--> | ||
| 724 | <STRONG>Synopsis</STRONG> | 771 | <STRONG>Synopsis</STRONG> | 
| 725 | 772 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 726 | <PRE> | ||
| 727 | #include <math.h> | ||
| 728 | double fabs(double <VAR>x</VAR>); | 773 | double fabs(double <VAR>x</VAR>); | 
| 729 | float fabsf(float <VAR>x</VAR>); | 774 | float fabsf(float <VAR>x</VAR>); | 
| 730 | 775 | ||
| 731 | </PRE> | 776 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 732 | |||
| 733 | <P> | ||
| 734 | <STRONG>Description</STRONG><BR> | ||
| 735 | <CODE>fabs</CODE> and <CODE>fabsf</CODE> calculate | 777 | <CODE>fabs</CODE> and <CODE>fabsf</CODE> calculate | 
| 736 | the absolute value (magnitude) of the argument <VAR>x</VAR>, by direct | 778 | the absolute value (magnitude) of the argument <VAR>x</VAR>, by direct | 
| 737 | manipulation of the bit representation of <VAR>x</VAR>. | 779 | manipulation of the bit representation of <VAR>x</VAR>. | 
| 738 | |||
| 739 | |||
| 740 | <P> | 780 | <P> | 
| 781 | |||
| 741 | <BR> | 782 | <BR> | 
| 742 | <STRONG>Returns</STRONG><BR> | 783 | <STRONG>Returns</STRONG><BR> | 
| 743 | The calculated value is returned. No errors are detected. | 784 | The calculated value is returned. No errors are detected. | 
| 785 | </P><P> | ||
| 744 | 786 | ||
| 745 | |||
| 746 | <P> | ||
| 747 | <BR> | 787 | <BR> | 
| 748 | <STRONG>Portability</STRONG><BR> | 788 | <STRONG>Portability</STRONG><BR> | 
| 749 | <CODE>fabs</CODE> is ANSI. | 789 | <CODE>fabs</CODE> is ANSI. | 
| 750 | <CODE>fabsf</CODE> is an extension. | 790 | <CODE>fabsf</CODE> is an extension. | 
| 751 | 791 | </P><P> | |
| 752 | 792 | ||
| 753 | <P> | 793 | <BR> | 
| 754 | <BR> | 794 | </P><P> | 
| 755 | 795 | ||
| 756 | 796 | <A NAME="floor"></A> | |
| 757 | 797 | <HR SIZE="6"> | |
| 758 | 798 | <A NAME="SEC15"></A> | |
| 759 | <H2><A NAME="SEC15" HREF="libm_toc.html#TOC15"><CODE>floor</CODE>, <CODE>floorf</CODE>, <CODE>ceil</CODE>, <CODE>ceilf</CODE>---floor and ceiling</A></H2> | 799 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 760 | <P> | 800 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC14"> < </A>]</TD> | 
| 761 | <A NAME="IDX39"></A> | 801 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC16"> > </A>]</TD> | 
| 762 | <A NAME="IDX40"></A> | 802 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 763 | <A NAME="IDX41"></A> | 803 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | 
| 764 | <A NAME="IDX42"></A> | 804 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | 
| 805 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 806 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 807 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 808 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 809 | </TR></TABLE> | ||
| 810 | <H2> 1.14 <CODE>floor</CODE>, <CODE>floorf</CODE>, <CODE>ceil</CODE>, <CODE>ceilf</CODE>---floor and ceiling </H2> | ||
| 811 | <!--docid::SEC15::--> | ||
| 765 | <STRONG>Synopsis</STRONG> | 812 | <STRONG>Synopsis</STRONG> | 
| 766 | 813 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 767 | <PRE> | ||
| 768 | #include <math.h> | ||
| 769 | double floor(double <VAR>x</VAR>); | 814 | double floor(double <VAR>x</VAR>); | 
| 770 | float floorf(float <VAR>x</VAR>); | 815 | float floorf(float <VAR>x</VAR>); | 
| 771 | double ceil(double <VAR>x</VAR>); | 816 | double ceil(double <VAR>x</VAR>); | 
| 772 | float ceilf(float <VAR>x</VAR>); | 817 | float ceilf(float <VAR>x</VAR>); | 
| 773 | 818 | ||
| 774 | </PRE> | 819 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 775 | |||
| 776 | <P> | ||
| 777 | <STRONG>Description</STRONG><BR> | ||
| 778 | <CODE>floor</CODE> and <CODE>floorf</CODE> find | 820 | <CODE>floor</CODE> and <CODE>floorf</CODE> find | 
| 779 | the nearest integer less than or equal to <VAR>x</VAR>. | 821 | the nearest integer less than or equal to <VAR>x</VAR>. | 
| 780 | <CODE>ceil</CODE> and <CODE>ceilf</CODE> find | 822 | <CODE>ceil</CODE> and <CODE>ceilf</CODE> find | 
| 781 | the nearest integer greater than or equal to <VAR>x</VAR>. | 823 | the nearest integer greater than or equal to <VAR>x</VAR>. | 
| 782 | |||
| 783 | |||
| 784 | <P> | 824 | <P> | 
| 825 | |||
| 785 | <BR> | 826 | <BR> | 
| 786 | <STRONG>Returns</STRONG><BR> | 827 | <STRONG>Returns</STRONG><BR> | 
| 787 | <CODE>floor</CODE> and <CODE>ceil</CODE> return the integer result as a double. | 828 | <CODE>floor</CODE> and <CODE>ceil</CODE> return the integer result as a double. | 
| 788 | <CODE>floorf</CODE> and <CODE>ceilf</CODE> return the integer result as a float. | 829 | <CODE>floorf</CODE> and <CODE>ceilf</CODE> return the integer result as a float. | 
| 830 | </P><P> | ||
| 789 | 831 | ||
| 790 | |||
| 791 | <P> | ||
| 792 | <BR> | 832 | <BR> | 
| 793 | <STRONG>Portability</STRONG><BR> | 833 | <STRONG>Portability</STRONG><BR> | 
| 794 | <CODE>floor</CODE> and <CODE>ceil</CODE> are ANSI. | 834 | <CODE>floor</CODE> and <CODE>ceil</CODE> are ANSI. | 
| 795 | <CODE>floorf</CODE> and <CODE>ceilf</CODE> are extensions. | 835 | <CODE>floorf</CODE> and <CODE>ceilf</CODE> are extensions. | 
| 796 | 836 | </P><P> | |
| 797 | 837 | ||
| 798 | <P> | 838 | <BR> | 
| 799 | <BR> | 839 | </P><P> | 
| 800 | 840 | ||
| 801 | 841 | <A NAME="fmod"></A> | |
| 802 | 842 | <HR SIZE="6"> | |
| 803 | 843 | <A NAME="SEC16"></A> | |
| 804 | <H2><A NAME="SEC16" HREF="libm_toc.html#TOC16"><CODE>fmod</CODE>, <CODE>fmodf</CODE>---floating-point remainder (modulo)</A></H2> | 844 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 805 | <P> | 845 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC15"> < </A>]</TD> | 
| 806 | <A NAME="IDX43"></A> | 846 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC17"> > </A>]</TD> | 
| 807 | <A NAME="IDX44"></A> | 847 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 848 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 849 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 850 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 851 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 852 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 853 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 854 | </TR></TABLE> | ||
| 855 | <H2> 1.15 <CODE>fmod</CODE>, <CODE>fmodf</CODE>---floating-point remainder (modulo) </H2> | ||
| 856 | <!--docid::SEC16::--> | ||
| 808 | <STRONG>Synopsis</STRONG> | 857 | <STRONG>Synopsis</STRONG> | 
| 809 | 858 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 810 | <PRE> | ||
| 811 | #include <math.h> | ||
| 812 | double fmod(double <VAR>x</VAR>, double <VAR>y</VAR>) | 859 | double fmod(double <VAR>x</VAR>, double <VAR>y</VAR>) | 
| 813 | float fmodf(float <VAR>x</VAR>, float <VAR>y</VAR>) | 860 | float fmodf(float <VAR>x</VAR>, float <VAR>y</VAR>) | 
| 814 | 861 | ||
| 815 | </PRE> | 862 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 816 | |||
| 817 | <P> | ||
| 818 | <STRONG>Description</STRONG><BR> | ||
| 819 | The <CODE>fmod</CODE> and <CODE>fmodf</CODE> functions compute the floating-point | 863 | The <CODE>fmod</CODE> and <CODE>fmodf</CODE> functions compute the floating-point | 
| 820 | remainder of <VAR>x</VAR>/<VAR>y</VAR> (<VAR>x</VAR> modulo <VAR>y</VAR>). | 864 | remainder of <VAR>x</VAR>/<VAR>y</VAR> (<VAR>x</VAR> modulo <VAR>y</VAR>). | 
| 821 | |||
| 822 | |||
| 823 | <P> | 865 | <P> | 
| 866 | |||
| 824 | <BR> | 867 | <BR> | 
| 825 | <STRONG>Returns</STRONG><BR> | 868 | <STRONG>Returns</STRONG><BR> | 
| 826 | The <CODE>fmod</CODE> function returns the value | 869 | The <CODE>fmod</CODE> function returns the value | 
| 827 | for the largest integer <VAR>i</VAR> such that, if <VAR>y</VAR> is nonzero, the | 870 | for the largest integer <VAR>i</VAR> such that, if <VAR>y</VAR> is nonzero, the | 
| 828 | result has the same sign as <VAR>x</VAR> and magnitude less than the | 871 | result has the same sign as <VAR>x</VAR> and magnitude less than the | 
| 829 | magnitude of <VAR>y</VAR>. | 872 | magnitude of <VAR>y</VAR>. | 
| 873 | </P><P> | ||
| 830 | 874 | ||
| 831 | |||
| 832 | <P> | ||
| 833 | <CODE>fmod(<VAR>x</VAR>,0)</CODE> returns NaN, and sets <CODE>errno</CODE> to <CODE>EDOM</CODE>. | 875 | <CODE>fmod(<VAR>x</VAR>,0)</CODE> returns NaN, and sets <CODE>errno</CODE> to <CODE>EDOM</CODE>. | 
| 876 | </P><P> | ||
| 834 | 877 | ||
| 835 | |||
| 836 | <P> | ||
| 837 | You can modify error treatment for these functions using <CODE>matherr</CODE>. | 878 | You can modify error treatment for these functions using <CODE>matherr</CODE>. | 
| 879 | </P><P> | ||
| 838 | 880 | ||
| 839 | |||
| 840 | <P> | ||
| 841 | <BR> | 881 | <BR> | 
| 842 | <STRONG>Portability</STRONG><BR> | 882 | <STRONG>Portability</STRONG><BR> | 
| 843 | <CODE>fmod</CODE> is ANSI C. <CODE>fmodf</CODE> is an extension. | 883 | <CODE>fmod</CODE> is ANSI C. <CODE>fmodf</CODE> is an extension. | 
| 844 | 884 | </P><P> | |
| 845 | 885 | ||
| 846 | <P> | 886 | <BR> | 
| 847 | <BR> | 887 | </P><P> | 
| 848 | 888 | ||
| 849 | 889 | <A NAME="frexp"></A> | |
| 850 | 890 | <HR SIZE="6"> | |
| 851 | 891 | <A NAME="SEC17"></A> | |
| 852 | <H2><A NAME="SEC17" HREF="libm_toc.html#TOC17"><CODE>frexp</CODE>, <CODE>frexpf</CODE>---split floating-point number</A></H2> | 892 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 853 | <P> | 893 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC16"> < </A>]</TD> | 
| 854 | <A NAME="IDX45"></A> | 894 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC18"> > </A>]</TD> | 
| 855 | <A NAME="IDX46"></A> | 895 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 896 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 897 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 898 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 899 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 900 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 901 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 902 | </TR></TABLE> | ||
| 903 | <H2> 1.16 <CODE>frexp</CODE>, <CODE>frexpf</CODE>---split floating-point number </H2> | ||
| 904 | <!--docid::SEC17::--> | ||
| 856 | <STRONG>Synopsis</STRONG> | 905 | <STRONG>Synopsis</STRONG> | 
| 857 | 906 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 858 | <PRE> | ||
| 859 | #include <math.h> | ||
| 860 | double frexp(double <VAR>val</VAR>, int *<VAR>exp</VAR>); | 907 | double frexp(double <VAR>val</VAR>, int *<VAR>exp</VAR>); | 
| 861 | float frexpf(float <VAR>val</VAR>, int *<VAR>exp</VAR>); | 908 | float frexpf(float <VAR>val</VAR>, int *<VAR>exp</VAR>); | 
| 862 | 909 | ||
| 863 | </PRE> | 910 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 864 | |||
| 865 | <P> | ||
| 866 | <STRONG>Description</STRONG><BR> | ||
| 867 | All non zero, normal numbers can be described as <VAR>m</VAR> * 2**<VAR>p</VAR>. | 911 | All non zero, normal numbers can be described as <VAR>m</VAR> * 2**<VAR>p</VAR>. | 
| 868 | <CODE>frexp</CODE> represents the double <VAR>val</VAR> as a mantissa <VAR>m</VAR> | 912 | <CODE>frexp</CODE> represents the double <VAR>val</VAR> as a mantissa <VAR>m</VAR> | 
| 869 | and a power of two <VAR>p</VAR>. The resulting mantissa will always | 913 | and a power of two <VAR>p</VAR>. The resulting mantissa will always | 
| 870 | be greater than or equal to <CODE>0.5</CODE>, and less than <CODE>1.0</CODE> (as | 914 | be greater than or equal to <CODE>0.5</CODE>, and less than <CODE>1.0</CODE> (as | 
| 871 | long as <VAR>val</VAR> is nonzero). The power of two will be stored | 915 | long as <VAR>val</VAR> is nonzero). The power of two will be stored | 
| 872 | in <CODE>*</CODE><VAR>exp</VAR>. | 916 | in <CODE>*</CODE><VAR>exp</VAR>. | 
| 873 | |||
| 874 | |||
| 875 | <P> | 917 | <P> | 
| 918 | |||
| 876 | <CODE>frexpf</CODE> is identical, other than taking and returning | 919 | <CODE>frexpf</CODE> is identical, other than taking and returning | 
| 877 | floats rather than doubles. | 920 | floats rather than doubles. | 
| 921 | </P><P> | ||
| 878 | 922 | ||
| 879 | |||
| 880 | <P> | ||
| 881 | <BR> | 923 | <BR> | 
| 882 | <STRONG>Returns</STRONG><BR> | 924 | <STRONG>Returns</STRONG><BR> | 
| 883 | <CODE>frexp</CODE> returns the mantissa <VAR>m</VAR>. If <VAR>val</VAR> is <CODE>0</CODE>, infinity, | 925 | <CODE>frexp</CODE> returns the mantissa <VAR>m</VAR>. If <VAR>val</VAR> is <CODE>0</CODE>, infinity, | 
| 884 | or Nan, <CODE>frexp</CODE> will set <CODE>*</CODE><VAR>exp</VAR> to <CODE>0</CODE> and return <VAR>val</VAR>. | 926 | or Nan, <CODE>frexp</CODE> will set <CODE>*</CODE><VAR>exp</VAR> to <CODE>0</CODE> and return <VAR>val</VAR>. | 
| 927 | </P><P> | ||
| 885 | 928 | ||
| 886 | |||
| 887 | <P> | ||
| 888 | <BR> | 929 | <BR> | 
| 889 | <STRONG>Portability</STRONG><BR> | 930 | <STRONG>Portability</STRONG><BR> | 
| 890 | <CODE>frexp</CODE> is ANSI. | 931 | <CODE>frexp</CODE> is ANSI. | 
| 891 | <CODE>frexpf</CODE> is an extension. | 932 | <CODE>frexpf</CODE> is an extension. | 
| 892 | 933 | </P><P> | |
| 893 | 934 | ||
| 894 | <P> | 935 | <BR> | 
| 895 | <BR> | 936 | </P><P> | 
| 896 | 937 | ||
| 897 | 938 | <A NAME="gamma"></A> | |
| 898 | 939 | <HR SIZE="6"> | |
| 899 | 940 | <A NAME="SEC18"></A> | |
| 900 | <H2><A NAME="SEC18" HREF="libm_toc.html#TOC18"><CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>,</A></H2> | 941 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 901 | <P> | 942 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC17"> < </A>]</TD> | 
| 902 | <A NAME="IDX47"></A> | 943 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC19"> > </A>]</TD> | 
| 903 | <A NAME="IDX48"></A> | 944 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 904 | <A NAME="IDX49"></A> | 945 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | 
| 905 | <A NAME="IDX50"></A> | 946 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | 
| 906 | <A NAME="IDX51"></A> | 947 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | 
| 907 | <A NAME="IDX52"></A> | 948 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | 
| 908 | <A NAME="IDX53"></A> | 949 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | 
| 909 | <A NAME="IDX54"></A> | 950 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | 
| 951 | </TR></TABLE> | ||
| 952 | <H2> 1.17 <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>, </H2> | ||
| 953 | <!--docid::SEC18::--> | ||
| 910 | <STRONG>Synopsis</STRONG> | 954 | <STRONG>Synopsis</STRONG> | 
| 911 | 955 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 912 | <PRE> | ||
| 913 | #include <math.h> | ||
| 914 | double gamma(double <VAR>x</VAR>); | 956 | double gamma(double <VAR>x</VAR>); | 
| 915 | float gammaf(float <VAR>x</VAR>); | 957 | float gammaf(float <VAR>x</VAR>); | 
| 916 | double lgamma(double <VAR>x</VAR>); | 958 | double lgamma(double <VAR>x</VAR>); | 
| @@ -920,10 +962,7 @@ float gammaf_r(float <VAR>x</VAR>, int *<VAR>signgamp</VAR>); | |||
| 920 | double lgamma_r(double <VAR>x</VAR>, int *<VAR>signgamp</VAR>); | 962 | double lgamma_r(double <VAR>x</VAR>, int *<VAR>signgamp</VAR>); | 
| 921 | float lgammaf_r(float <VAR>x</VAR>, int *<VAR>signgamp</VAR>); | 963 | float lgammaf_r(float <VAR>x</VAR>, int *<VAR>signgamp</VAR>); | 
| 922 | 964 | ||
| 923 | </PRE> | 965 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 924 | |||
| 925 | <P> | ||
| 926 | <STRONG>Description</STRONG><BR> | ||
| 927 | <CODE>gamma</CODE> calculates | 966 | <CODE>gamma</CODE> calculates | 
| 928 | the natural logarithm of the gamma function of <VAR>x</VAR>. The gamma function | 967 | the natural logarithm of the gamma function of <VAR>x</VAR>. The gamma function | 
| 929 | (<CODE>exp(gamma(<VAR>x</VAR>))</CODE>) is a generalization of factorial, and retains | 968 | (<CODE>exp(gamma(<VAR>x</VAR>))</CODE>) is a generalization of factorial, and retains | 
| @@ -931,26 +970,22 @@ the property that | |||
| 931 | Accordingly, the results of the gamma function itself grow very | 970 | Accordingly, the results of the gamma function itself grow very | 
| 932 | quickly. <CODE>gamma</CODE> is defined as | 971 | quickly. <CODE>gamma</CODE> is defined as | 
| 933 | to extend the useful range of results representable. | 972 | to extend the useful range of results representable. | 
| 934 | |||
| 935 | |||
| 936 | <P> | 973 | <P> | 
| 974 | |||
| 937 | The sign of the result is returned in the global variable <CODE>signgam</CODE>, | 975 | The sign of the result is returned in the global variable <CODE>signgam</CODE>, | 
| 938 | which is declared in math.h. | 976 | which is declared in math.h. | 
| 977 | </P><P> | ||
| 939 | 978 | ||
| 940 | |||
| 941 | <P> | ||
| 942 | <CODE>gammaf</CODE> performs the same calculation as <CODE>gamma</CODE>, but uses and | 979 | <CODE>gammaf</CODE> performs the same calculation as <CODE>gamma</CODE>, but uses and | 
| 943 | returns <CODE>float</CODE> values. | 980 | returns <CODE>float</CODE> values. | 
| 981 | </P><P> | ||
| 944 | 982 | ||
| 945 | |||
| 946 | <P> | ||
| 947 | <CODE>lgamma</CODE> and <CODE>lgammaf</CODE> are alternate names for <CODE>gamma</CODE> and | 983 | <CODE>lgamma</CODE> and <CODE>lgammaf</CODE> are alternate names for <CODE>gamma</CODE> and | 
| 948 | <CODE>gammaf</CODE>. The use of <CODE>lgamma</CODE> instead of <CODE>gamma</CODE> is a reminder | 984 | <CODE>gammaf</CODE>. The use of <CODE>lgamma</CODE> instead of <CODE>gamma</CODE> is a reminder | 
| 949 | that these functions compute the log of the gamma function, rather | 985 | that these functions compute the log of the gamma function, rather | 
| 950 | than the gamma function itself. | 986 | than the gamma function itself. | 
| 987 | </P><P> | ||
| 951 | 988 | ||
| 952 | |||
| 953 | <P> | ||
| 954 | The functions <CODE>gamma_r</CODE>, <CODE>gammaf_r</CODE>, <CODE>lgamma_r</CODE>, and | 989 | The functions <CODE>gamma_r</CODE>, <CODE>gammaf_r</CODE>, <CODE>lgamma_r</CODE>, and | 
| 955 | <CODE>lgammaf_r</CODE> are just like <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, and | 990 | <CODE>lgammaf_r</CODE> are just like <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, and | 
| 956 | <CODE>lgammaf</CODE>, respectively, but take an additional argument. This | 991 | <CODE>lgammaf</CODE>, respectively, but take an additional argument. This | 
| @@ -959,87 +994,89 @@ argument is used to return the sign of the result, and the global | |||
| 959 | variable <CODE>signgam</CODE> is not used. These functions may be used for | 994 | variable <CODE>signgam</CODE> is not used. These functions may be used for | 
| 960 | reentrant calls (but they will still set the global variable <CODE>errno</CODE> | 995 | reentrant calls (but they will still set the global variable <CODE>errno</CODE> | 
| 961 | if an error occurs). | 996 | if an error occurs). | 
| 997 | </P><P> | ||
| 962 | 998 | ||
| 963 | |||
| 964 | <P> | ||
| 965 | <BR> | 999 | <BR> | 
| 966 | <STRONG>Returns</STRONG><BR> | 1000 | <STRONG>Returns</STRONG><BR> | 
| 967 | Normally, the computed result is returned. | 1001 | Normally, the computed result is returned. | 
| 1002 | </P><P> | ||
| 968 | 1003 | ||
| 969 | |||
| 970 | <P> | ||
| 971 | When <VAR>x</VAR> is a nonpositive integer, <CODE>gamma</CODE> returns <CODE>HUGE_VAL</CODE> | 1004 | When <VAR>x</VAR> is a nonpositive integer, <CODE>gamma</CODE> returns <CODE>HUGE_VAL</CODE> | 
| 972 | and <CODE>errno</CODE> is set to <CODE>EDOM</CODE>. If the result overflows, <CODE>gamma</CODE> | 1005 | and <CODE>errno</CODE> is set to <CODE>EDOM</CODE>. If the result overflows, <CODE>gamma</CODE> | 
| 973 | returns <CODE>HUGE_VAL</CODE> and <CODE>errno</CODE> is set to <CODE>ERANGE</CODE>. | 1006 | returns <CODE>HUGE_VAL</CODE> and <CODE>errno</CODE> is set to <CODE>ERANGE</CODE>. | 
| 1007 | </P><P> | ||
| 974 | 1008 | ||
| 975 | |||
| 976 | <P> | ||
| 977 | You can modify this error treatment using <CODE>matherr</CODE>. | 1009 | You can modify this error treatment using <CODE>matherr</CODE>. | 
| 1010 | </P><P> | ||
| 978 | 1011 | ||
| 979 | |||
| 980 | <P> | ||
| 981 | <BR> | 1012 | <BR> | 
| 982 | <STRONG>Portability</STRONG><BR> | 1013 | <STRONG>Portability</STRONG><BR> | 
| 983 | Neither <CODE>gamma</CODE> nor <CODE>gammaf</CODE> is ANSI C. | 1014 | Neither <CODE>gamma</CODE> nor <CODE>gammaf</CODE> is ANSI C. | 
| 984 | <BR> | 1015 | <BR> | 
| 985 | 1016 | </P><P> | |
| 986 | 1017 | ||
| 987 | 1018 | <A NAME="hypot"></A> | |
| 988 | 1019 | <HR SIZE="6"> | |
| 989 | <H2><A NAME="SEC19" HREF="libm_toc.html#TOC19"><CODE>hypot</CODE>, <CODE>hypotf</CODE>---distance from origin</A></H2> | 1020 | <A NAME="SEC19"></A> | 
| 990 | <P> | 1021 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 991 | <A NAME="IDX55"></A> | 1022 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC18"> < </A>]</TD> | 
| 992 | <A NAME="IDX56"></A> | 1023 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC20"> > </A>]</TD> | 
| 1024 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 1025 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1026 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1027 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1028 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1029 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1030 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1031 | </TR></TABLE> | ||
| 1032 | <H2> 1.18 <CODE>hypot</CODE>, <CODE>hypotf</CODE>---distance from origin </H2> | ||
| 1033 | <!--docid::SEC19::--> | ||
| 993 | <STRONG>Synopsis</STRONG> | 1034 | <STRONG>Synopsis</STRONG> | 
| 994 | 1035 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 995 | <PRE> | ||
| 996 | #include <math.h> | ||
| 997 | double hypot(double <VAR>x</VAR>, double <VAR>y</VAR>); | 1036 | double hypot(double <VAR>x</VAR>, double <VAR>y</VAR>); | 
| 998 | float hypotf(float <VAR>x</VAR>, float <VAR>y</VAR>); | 1037 | float hypotf(float <VAR>x</VAR>, float <VAR>y</VAR>); | 
| 999 | 1038 | ||
| 1000 | </PRE> | 1039 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1001 | |||
| 1002 | <P> | ||
| 1003 | <STRONG>Description</STRONG><BR> | ||
| 1004 | <CODE>hypot</CODE> calculates the Euclidean distance | 1040 | <CODE>hypot</CODE> calculates the Euclidean distance | 
| 1005 | between the origin (0,0) and a point represented by the | 1041 | between the origin (0,0) and a point represented by the | 
| 1006 | Cartesian coordinates (<VAR>x</VAR>,<VAR>y</VAR>). <CODE>hypotf</CODE> differs only | 1042 | Cartesian coordinates (<VAR>x</VAR>,<VAR>y</VAR>). <CODE>hypotf</CODE> differs only | 
| 1007 | in the type of its arguments and result. | 1043 | in the type of its arguments and result. | 
| 1008 | |||
| 1009 | |||
| 1010 | <P> | 1044 | <P> | 
| 1045 | |||
| 1011 | <BR> | 1046 | <BR> | 
| 1012 | <STRONG>Returns</STRONG><BR> | 1047 | <STRONG>Returns</STRONG><BR> | 
| 1013 | Normally, the distance value is returned. On overflow, | 1048 | Normally, the distance value is returned. On overflow, | 
| 1014 | <CODE>hypot</CODE> returns <CODE>HUGE_VAL</CODE> and sets <CODE>errno</CODE> to | 1049 | <CODE>hypot</CODE> returns <CODE>HUGE_VAL</CODE> and sets <CODE>errno</CODE> to | 
| 1015 | <CODE>ERANGE</CODE>. | 1050 | <CODE>ERANGE</CODE>. | 
| 1051 | </P><P> | ||
| 1016 | 1052 | ||
| 1017 | |||
| 1018 | <P> | ||
| 1019 | You can change the error treatment with <CODE>matherr</CODE>. | 1053 | You can change the error treatment with <CODE>matherr</CODE>. | 
| 1054 | </P><P> | ||
| 1020 | 1055 | ||
| 1021 | |||
| 1022 | <P> | ||
| 1023 | <BR> | 1056 | <BR> | 
| 1024 | <STRONG>Portability</STRONG><BR> | 1057 | <STRONG>Portability</STRONG><BR> | 
| 1025 | <CODE>hypot</CODE> and <CODE>hypotf</CODE> are not ANSI C. | 1058 | <CODE>hypot</CODE> and <CODE>hypotf</CODE> are not ANSI C. | 
| 1026 | <BR> | 1059 | <BR> | 
| 1027 | 1060 | </P><P> | |
| 1028 | 1061 | ||
| 1029 | 1062 | <A NAME="isnan"></A> | |
| 1030 | 1063 | <HR SIZE="6"> | |
| 1031 | <H2><A NAME="SEC20" HREF="libm_toc.html#TOC20"><CODE>isnan</CODE>,<CODE>isnanf</CODE>,<CODE>isinf</CODE>,<CODE>isinff</CODE>,<CODE>finite</CODE>,<CODE>finitef</CODE>---test for exceptional numbers</A></H2> | 1064 | <A NAME="SEC20"></A> | 
| 1032 | <P> | 1065 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1033 | <A NAME="IDX57"></A> | 1066 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC19"> < </A>]</TD> | 
| 1034 | <A NAME="IDX58"></A> | 1067 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC21"> > </A>]</TD> | 
| 1035 | <A NAME="IDX59"></A> | 1068 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1036 | <A NAME="IDX60"></A> | 1069 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | 
| 1037 | <A NAME="IDX61"></A> | 1070 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | 
| 1038 | <A NAME="IDX62"></A> | 1071 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | 
| 1072 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1073 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1074 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1075 | </TR></TABLE> | ||
| 1076 | <H2> 1.19 <CODE>isnan</CODE>,<CODE>isnanf</CODE>,<CODE>isinf</CODE>,<CODE>isinff</CODE>,<CODE>finite</CODE>,<CODE>finitef</CODE>---test for exceptional numbers </H2> | ||
| 1077 | <!--docid::SEC20::--> | ||
| 1039 | <STRONG>Synopsis</STRONG> | 1078 | <STRONG>Synopsis</STRONG> | 
| 1040 | 1079 | <TABLE><tr><td> </td><td class=example><pre>#include <ieeefp.h> | |
| 1041 | <PRE> | ||
| 1042 | #include <ieeefp.h> | ||
| 1043 | int isnan(double <VAR>arg</VAR>); | 1080 | int isnan(double <VAR>arg</VAR>); | 
| 1044 | int isinf(double <VAR>arg</VAR>); | 1081 | int isinf(double <VAR>arg</VAR>); | 
| 1045 | int finite(double <VAR>arg</VAR>); | 1082 | int finite(double <VAR>arg</VAR>); | 
| @@ -1047,121 +1084,116 @@ int isnanf(float <VAR>arg</VAR>); | |||
| 1047 | int isinff(float <VAR>arg</VAR>); | 1084 | int isinff(float <VAR>arg</VAR>); | 
| 1048 | int finitef(float <VAR>arg</VAR>); | 1085 | int finitef(float <VAR>arg</VAR>); | 
| 1049 | 1086 | ||
| 1050 | </PRE> | 1087 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1051 | |||
| 1052 | <P> | ||
| 1053 | <STRONG>Description</STRONG><BR> | ||
| 1054 | These functions provide information on the floating point | 1088 | These functions provide information on the floating point | 
| 1055 | argument supplied. | 1089 | argument supplied. | 
| 1056 | |||
| 1057 | |||
| 1058 | <P> | 1090 | <P> | 
| 1091 | |||
| 1059 | There are five major number formats - | 1092 | There are five major number formats - | 
| 1060 | <DL COMPACT> | 1093 | <DL COMPACT> | 
| 1061 | 1094 | ||
| 1062 | <DT><CODE>zero</CODE> | 1095 | <DT><CODE>zero</CODE> | 
| 1063 | <DD> | 1096 | <DD>a number which contains all zero bits. | 
| 1064 | a number which contains all zero bits. | ||
| 1065 | <DT><CODE>subnormal</CODE> | 1097 | <DT><CODE>subnormal</CODE> | 
| 1066 | <DD> | 1098 | <DD>Is used to represent number with a zero exponent, but a non zero fraction. | 
| 1067 | Is used to represent number with a zero exponent, but a non zero fraction. | ||
| 1068 | <DT><CODE>normal</CODE> | 1099 | <DT><CODE>normal</CODE> | 
| 1069 | <DD> | 1100 | <DD>A number with an exponent, and a fraction | 
| 1070 | A number with an exponent, and a fraction | ||
| 1071 | <DT><CODE>infinity</CODE> | 1101 | <DT><CODE>infinity</CODE> | 
| 1072 | <DD> | 1102 | <DD>A number with an all 1's exponent and a zero fraction. | 
| 1073 | A number with an all 1's exponent and a zero fraction. | ||
| 1074 | <DT><CODE>NAN</CODE> | 1103 | <DT><CODE>NAN</CODE> | 
| 1075 | <DD> | 1104 | <DD>A number with an all 1's exponent and a non zero fraction. | 
| 1076 | A number with an all 1's exponent and a non zero fraction. | 1105 | <P> | 
| 1077 | 1106 | ||
| 1078 | </DL> | 1107 | </DL> | 
| 1079 | |||
| 1080 | <P> | 1108 | <P> | 
| 1109 | |||
| 1081 | <CODE>isnan</CODE> returns 1 if the argument is a nan. <CODE>isinf</CODE> | 1110 | <CODE>isnan</CODE> returns 1 if the argument is a nan. <CODE>isinf</CODE> | 
| 1082 | returns 1 if the argument is infinity. <CODE>finite</CODE> returns 1 if the | 1111 | returns 1 if the argument is infinity. <CODE>finite</CODE> returns 1 if the | 
| 1083 | argument is zero, subnormal or normal. | 1112 | argument is zero, subnormal or normal. | 
| 1084 | The <CODE>isnanf</CODE>, <CODE>isinff</CODE> and <CODE>finitef</CODE> perform the same | 1113 | The <CODE>isnanf</CODE>, <CODE>isinff</CODE> and <CODE>finitef</CODE> perform the same | 
| 1085 | operations as their <CODE>isnan</CODE>, <CODE>isinf</CODE> and <CODE>finite</CODE> | 1114 | operations as their <CODE>isnan</CODE>, <CODE>isinf</CODE> and <CODE>finite</CODE> | 
| 1086 | counterparts, but on single precision floating point numbers. | 1115 | counterparts, but on single precision floating point numbers. | 
| 1087 | 1116 | </P><P> | |
| 1088 | 1117 | ||
| 1089 | <P> | 1118 | <BR> | 
| 1090 | <BR> | 1119 | </P><P> | 
| 1091 | 1120 | ||
| 1092 | 1121 | <A NAME="ldexp"></A> | |
| 1093 | 1122 | <HR SIZE="6"> | |
| 1094 | 1123 | <A NAME="SEC21"></A> | |
| 1095 | <H2><A NAME="SEC21" HREF="libm_toc.html#TOC21"><CODE>ldexp</CODE>, <CODE>ldexpf</CODE>---load exponent</A></H2> | 1124 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1096 | <P> | 1125 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC20"> < </A>]</TD> | 
| 1097 | <A NAME="IDX63"></A> | 1126 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC22"> > </A>]</TD> | 
| 1098 | <A NAME="IDX64"></A> | 1127 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1128 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1129 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1130 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1131 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1132 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1133 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1134 | </TR></TABLE> | ||
| 1135 | <H2> 1.20 <CODE>ldexp</CODE>, <CODE>ldexpf</CODE>---load exponent </H2> | ||
| 1136 | <!--docid::SEC21::--> | ||
| 1099 | <STRONG>Synopsis</STRONG> | 1137 | <STRONG>Synopsis</STRONG> | 
| 1100 | 1138 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1101 | <PRE> | ||
| 1102 | #include <math.h> | ||
| 1103 | double ldexp(double <VAR>val</VAR>, int <VAR>exp</VAR>); | 1139 | double ldexp(double <VAR>val</VAR>, int <VAR>exp</VAR>); | 
| 1104 | float ldexpf(float <VAR>val</VAR>, int <VAR>exp</VAR>); | 1140 | float ldexpf(float <VAR>val</VAR>, int <VAR>exp</VAR>); | 
| 1105 | 1141 | ||
| 1106 | </PRE> | 1142 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1107 | |||
| 1108 | <P> | ||
| 1109 | <STRONG>Description</STRONG><BR> | ||
| 1110 | <CODE>ldexp</CODE> calculates the value | 1143 | <CODE>ldexp</CODE> calculates the value | 
| 1111 | <CODE>ldexpf</CODE> is identical, save that it takes and returns <CODE>float</CODE> | 1144 | <CODE>ldexpf</CODE> is identical, save that it takes and returns <CODE>float</CODE> | 
| 1112 | rather than <CODE>double</CODE> values. | 1145 | rather than <CODE>double</CODE> values. | 
| 1113 | |||
| 1114 | |||
| 1115 | <P> | 1146 | <P> | 
| 1147 | |||
| 1116 | <BR> | 1148 | <BR> | 
| 1117 | <STRONG>Returns</STRONG><BR> | 1149 | <STRONG>Returns</STRONG><BR> | 
| 1118 | <CODE>ldexp</CODE> returns the calculated value. | 1150 | <CODE>ldexp</CODE> returns the calculated value. | 
| 1151 | </P><P> | ||
| 1119 | 1152 | ||
| 1120 | |||
| 1121 | <P> | ||
| 1122 | Underflow and overflow both set <CODE>errno</CODE> to <CODE>ERANGE</CODE>. | 1153 | Underflow and overflow both set <CODE>errno</CODE> to <CODE>ERANGE</CODE>. | 
| 1123 | On underflow, <CODE>ldexp</CODE> and <CODE>ldexpf</CODE> return 0.0. | 1154 | On underflow, <CODE>ldexp</CODE> and <CODE>ldexpf</CODE> return 0.0. | 
| 1124 | On overflow, <CODE>ldexp</CODE> returns plus or minus <CODE>HUGE_VAL</CODE>. | 1155 | On overflow, <CODE>ldexp</CODE> returns plus or minus <CODE>HUGE_VAL</CODE>. | 
| 1156 | </P><P> | ||
| 1125 | 1157 | ||
| 1126 | |||
| 1127 | <P> | ||
| 1128 | <BR> | 1158 | <BR> | 
| 1129 | <STRONG>Portability</STRONG><BR> | 1159 | <STRONG>Portability</STRONG><BR> | 
| 1130 | <CODE>ldexp</CODE> is ANSI, <CODE>ldexpf</CODE> is an extension. | 1160 | <CODE>ldexp</CODE> is ANSI, <CODE>ldexpf</CODE> is an extension. | 
| 1131 | 1161 | </P><P> | |
| 1132 | 1162 | ||
| 1133 | <P> | 1163 | <BR> | 
| 1134 | <BR> | 1164 | </P><P> | 
| 1135 | 1165 | ||
| 1136 | 1166 | <A NAME="log"></A> | |
| 1137 | 1167 | <HR SIZE="6"> | |
| 1138 | 1168 | <A NAME="SEC22"></A> | |
| 1139 | <H2><A NAME="SEC22" HREF="libm_toc.html#TOC22"><CODE>log</CODE>, <CODE>logf</CODE>---natural logarithms</A></H2> | 1169 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1140 | <P> | 1170 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC21"> < </A>]</TD> | 
| 1141 | <A NAME="IDX65"></A> | 1171 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC23"> > </A>]</TD> | 
| 1142 | <A NAME="IDX66"></A> | 1172 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1173 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1174 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1175 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1176 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1177 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1178 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1179 | </TR></TABLE> | ||
| 1180 | <H2> 1.21 <CODE>log</CODE>, <CODE>logf</CODE>---natural logarithms </H2> | ||
| 1181 | <!--docid::SEC22::--> | ||
| 1143 | <STRONG>Synopsis</STRONG> | 1182 | <STRONG>Synopsis</STRONG> | 
| 1144 | 1183 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1145 | <PRE> | ||
| 1146 | #include <math.h> | ||
| 1147 | double log(double <VAR>x</VAR>); | 1184 | double log(double <VAR>x</VAR>); | 
| 1148 | float logf(float <VAR>x</VAR>); | 1185 | float logf(float <VAR>x</VAR>); | 
| 1149 | 1186 | ||
| 1150 | </PRE> | 1187 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1151 | |||
| 1152 | <P> | ||
| 1153 | <STRONG>Description</STRONG><BR> | ||
| 1154 | Return the natural logarithm of <VAR>x</VAR>, that is, its logarithm base e | 1188 | Return the natural logarithm of <VAR>x</VAR>, that is, its logarithm base e | 
| 1155 | (where e is the base of the natural system of logarithms, 2.71828...). | 1189 | (where e is the base of the natural system of logarithms, 2.71828<small>...</small>). | 
| 1156 | <CODE>log</CODE> and <CODE>logf</CODE> are identical save for the return and argument types. | 1190 | <CODE>log</CODE> and <CODE>logf</CODE> are identical save for the return and argument types. | 
| 1157 | |||
| 1158 | |||
| 1159 | <P> | 1191 | <P> | 
| 1192 | |||
| 1160 | You can use the (non-ANSI) function <CODE>matherr</CODE> to specify error | 1193 | You can use the (non-ANSI) function <CODE>matherr</CODE> to specify error | 
| 1161 | handling for these functions. | 1194 | handling for these functions. | 
| 1195 | </P><P> | ||
| 1162 | 1196 | ||
| 1163 | |||
| 1164 | <P> | ||
| 1165 | <BR> | 1197 | <BR> | 
| 1166 | <STRONG>Returns</STRONG><BR> | 1198 | <STRONG>Returns</STRONG><BR> | 
| 1167 | Normally, returns the calculated value. When <VAR>x</VAR> is zero, the | 1199 | Normally, returns the calculated value. When <VAR>x</VAR> is zero, the | 
| @@ -1169,753 +1201,761 @@ returned value is <CODE>-HUGE_VAL</CODE> and <CODE>errno</CODE> is set to <CODE> | |||
| 1169 | When <VAR>x</VAR> is negative, the returned value is <CODE>-HUGE_VAL</CODE> and | 1201 | When <VAR>x</VAR> is negative, the returned value is <CODE>-HUGE_VAL</CODE> and | 
| 1170 | <CODE>errno</CODE> is set to <CODE>EDOM</CODE>. You can control the error behavior via | 1202 | <CODE>errno</CODE> is set to <CODE>EDOM</CODE>. You can control the error behavior via | 
| 1171 | <CODE>matherr</CODE>. | 1203 | <CODE>matherr</CODE>. | 
| 1204 | </P><P> | ||
| 1172 | 1205 | ||
| 1173 | |||
| 1174 | <P> | ||
| 1175 | <BR> | 1206 | <BR> | 
| 1176 | <STRONG>Portability</STRONG><BR> | 1207 | <STRONG>Portability</STRONG><BR> | 
| 1177 | <CODE>log</CODE> is ANSI, <CODE>logf</CODE> is an extension. | 1208 | <CODE>log</CODE> is ANSI, <CODE>logf</CODE> is an extension. | 
| 1178 | 1209 | </P><P> | |
| 1179 | 1210 | ||
| 1180 | <P> | 1211 | <BR> | 
| 1181 | <BR> | 1212 | </P><P> | 
| 1182 | 1213 | ||
| 1183 | 1214 | <A NAME="log10"></A> | |
| 1184 | 1215 | <HR SIZE="6"> | |
| 1185 | 1216 | <A NAME="SEC23"></A> | |
| 1186 | <H2><A NAME="SEC23" HREF="libm_toc.html#TOC23"><CODE>log10</CODE>, <CODE>log10f</CODE>---base 10 logarithms</A></H2> | 1217 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1187 | <P> | 1218 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC22"> < </A>]</TD> | 
| 1188 | <A NAME="IDX67"></A> | 1219 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC24"> > </A>]</TD> | 
| 1189 | <A NAME="IDX68"></A> | 1220 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1221 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1222 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1223 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1224 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1225 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1226 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1227 | </TR></TABLE> | ||
| 1228 | <H2> 1.22 <CODE>log10</CODE>, <CODE>log10f</CODE>---base 10 logarithms </H2> | ||
| 1229 | <!--docid::SEC23::--> | ||
| 1190 | <STRONG>Synopsis</STRONG> | 1230 | <STRONG>Synopsis</STRONG> | 
| 1191 | 1231 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1192 | <PRE> | ||
| 1193 | #include <math.h> | ||
| 1194 | double log10(double <VAR>x</VAR>); | 1232 | double log10(double <VAR>x</VAR>); | 
| 1195 | float log10f(float <VAR>x</VAR>); | 1233 | float log10f(float <VAR>x</VAR>); | 
| 1196 | 1234 | ||
| 1197 | </PRE> | 1235 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1198 | |||
| 1199 | <P> | ||
| 1200 | <STRONG>Description</STRONG><BR> | ||
| 1201 | <CODE>log10</CODE> returns the base 10 logarithm of <VAR>x</VAR>. | 1236 | <CODE>log10</CODE> returns the base 10 logarithm of <VAR>x</VAR>. | 
| 1202 | It is implemented as <CODE>log(<VAR>x</VAR>) / log(10)</CODE>. | 1237 | It is implemented as <CODE>log(<VAR>x</VAR>) / log(10)</CODE>. | 
| 1203 | |||
| 1204 | |||
| 1205 | <P> | 1238 | <P> | 
| 1206 | <CODE>log10f</CODE> is identical, save that it takes and returns <CODE>float</CODE> values. | ||
| 1207 | 1239 | ||
| 1240 | <CODE>log10f</CODE> is identical, save that it takes and returns <CODE>float</CODE> values. | ||
| 1241 | </P><P> | ||
| 1208 | 1242 | ||
| 1209 | <P> | ||
| 1210 | <BR> | 1243 | <BR> | 
| 1211 | <STRONG>Returns</STRONG><BR> | 1244 | <STRONG>Returns</STRONG><BR> | 
| 1212 | <CODE>log10</CODE> and <CODE>log10f</CODE> return the calculated value. | 1245 | <CODE>log10</CODE> and <CODE>log10f</CODE> return the calculated value. | 
| 1246 | </P><P> | ||
| 1213 | 1247 | ||
| 1214 | |||
| 1215 | <P> | ||
| 1216 | See the description of <CODE>log</CODE> for information on errors. | 1248 | See the description of <CODE>log</CODE> for information on errors. | 
| 1249 | </P><P> | ||
| 1217 | 1250 | ||
| 1218 | |||
| 1219 | <P> | ||
| 1220 | <BR> | 1251 | <BR> | 
| 1221 | <STRONG>Portability</STRONG><BR> | 1252 | <STRONG>Portability</STRONG><BR> | 
| 1222 | <CODE>log10</CODE> is ANSI C. <CODE>log10f</CODE> is an extension. | 1253 | <CODE>log10</CODE> is ANSI C. <CODE>log10f</CODE> is an extension. | 
| 1223 | 1254 | </P><P> | |
| 1224 | 1255 | ||
| 1225 | <P> | 1256 | <BR> | 
| 1226 | <BR> | 1257 | </P><P> | 
| 1227 | 1258 | ||
| 1228 | 1259 | <A NAME="pow"></A> | |
| 1229 | 1260 | <HR SIZE="6"> | |
| 1230 | 1261 | <A NAME="SEC24"></A> | |
| 1231 | <H2><A NAME="SEC24" HREF="libm_toc.html#TOC24"><CODE>pow</CODE>, <CODE>powf</CODE>---x to the power y</A></H2> | 1262 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1232 | <P> | 1263 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC23"> < </A>]</TD> | 
| 1233 | <A NAME="IDX69"></A> | 1264 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC25"> > </A>]</TD> | 
| 1234 | <A NAME="IDX70"></A> | 1265 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1266 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1267 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1268 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1269 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1270 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1271 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1272 | </TR></TABLE> | ||
| 1273 | <H2> 1.23 <CODE>pow</CODE>, <CODE>powf</CODE>---x to the power y </H2> | ||
| 1274 | <!--docid::SEC24::--> | ||
| 1235 | <STRONG>Synopsis</STRONG> | 1275 | <STRONG>Synopsis</STRONG> | 
| 1236 | 1276 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1237 | <PRE> | ||
| 1238 | #include <math.h> | ||
| 1239 | double pow(double <VAR>x</VAR>, double <VAR>y</VAR>); | 1277 | double pow(double <VAR>x</VAR>, double <VAR>y</VAR>); | 
| 1240 | float pow(float <VAR>x</VAR>, float <VAR>y</VAR>); | 1278 | float pow(float <VAR>x</VAR>, float <VAR>y</VAR>); | 
| 1241 | 1279 | ||
| 1242 | </PRE> | 1280 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1243 | |||
| 1244 | <P> | ||
| 1245 | <STRONG>Description</STRONG><BR> | ||
| 1246 | <CODE>pow</CODE> and <CODE>powf</CODE> calculate <VAR>x</VAR> raised to the exp1.0nt <VAR>y</VAR>. | 1281 | <CODE>pow</CODE> and <CODE>powf</CODE> calculate <VAR>x</VAR> raised to the exp1.0nt <VAR>y</VAR>. | 
| 1247 | |||
| 1248 | |||
| 1249 | <P> | 1282 | <P> | 
| 1283 | |||
| 1250 | <BR> | 1284 | <BR> | 
| 1251 | <STRONG>Returns</STRONG><BR> | 1285 | <STRONG>Returns</STRONG><BR> | 
| 1252 | On success, <CODE>pow</CODE> and <CODE>powf</CODE> return the value calculated. | 1286 | On success, <CODE>pow</CODE> and <CODE>powf</CODE> return the value calculated. | 
| 1287 | </P><P> | ||
| 1253 | 1288 | ||
| 1254 | |||
| 1255 | <P> | ||
| 1256 | When the argument values would produce overflow, <CODE>pow</CODE> | 1289 | When the argument values would produce overflow, <CODE>pow</CODE> | 
| 1257 | returns <CODE>HUGE_VAL</CODE> and set <CODE>errno</CODE> to <CODE>ERANGE</CODE>. If the | 1290 | returns <CODE>HUGE_VAL</CODE> and set <CODE>errno</CODE> to <CODE>ERANGE</CODE>. If the | 
| 1258 | argument <VAR>x</VAR> passed to <CODE>pow</CODE> or <CODE>powf</CODE> is a negative | 1291 | argument <VAR>x</VAR> passed to <CODE>pow</CODE> or <CODE>powf</CODE> is a negative | 
| 1259 | noninteger, and <VAR>y</VAR> is also not an integer, then <CODE>errno</CODE> | 1292 | noninteger, and <VAR>y</VAR> is also not an integer, then <CODE>errno</CODE> | 
| 1260 | is set to <CODE>EDOM</CODE>. If <VAR>x</VAR> and <VAR>y</VAR> are both 0, then | 1293 | is set to <CODE>EDOM</CODE>. If <VAR>x</VAR> and <VAR>y</VAR> are both 0, then | 
| 1261 | <CODE>pow</CODE> and <CODE>powf</CODE> return <CODE>1</CODE>. | 1294 | <CODE>pow</CODE> and <CODE>powf</CODE> return <CODE>1</CODE>. | 
| 1295 | </P><P> | ||
| 1262 | 1296 | ||
| 1263 | |||
| 1264 | <P> | ||
| 1265 | You can modify error handling for these functions using <CODE>matherr</CODE>. | 1297 | You can modify error handling for these functions using <CODE>matherr</CODE>. | 
| 1298 | </P><P> | ||
| 1266 | 1299 | ||
| 1267 | |||
| 1268 | <P> | ||
| 1269 | <BR> | 1300 | <BR> | 
| 1270 | <STRONG>Portability</STRONG><BR> | 1301 | <STRONG>Portability</STRONG><BR> | 
| 1271 | <CODE>pow</CODE> is ANSI C. <CODE>powf</CODE> is an extension. | 1302 | <CODE>pow</CODE> is ANSI C. <CODE>powf</CODE> is an extension. | 
| 1272 | <BR> | 1303 | <BR> | 
| 1273 | 1304 | </P><P> | |
| 1274 | 1305 | ||
| 1275 | 1306 | <A NAME="remainder"></A> | |
| 1276 | 1307 | <HR SIZE="6"> | |
| 1277 | <H2><A NAME="SEC25" HREF="libm_toc.html#TOC25"><CODE>remainder</CODE>, <CODE>remainderf</CODE>---round and remainder</A></H2> | 1308 | <A NAME="SEC25"></A> | 
| 1278 | <P> | 1309 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1279 | <A NAME="IDX71"></A> | 1310 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC24"> < </A>]</TD> | 
| 1280 | <A NAME="IDX72"></A> | 1311 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC26"> > </A>]</TD> | 
| 1312 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 1313 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1314 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1315 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1316 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1317 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1318 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1319 | </TR></TABLE> | ||
| 1320 | <H2> 1.24 <CODE>remainder</CODE>, <CODE>remainderf</CODE>---round and remainder </H2> | ||
| 1321 | <!--docid::SEC25::--> | ||
| 1281 | <STRONG>Synopsis</STRONG> | 1322 | <STRONG>Synopsis</STRONG> | 
| 1282 | 1323 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1283 | <PRE> | ||
| 1284 | #include <math.h> | ||
| 1285 | double remainder(double <VAR>x</VAR>, double <VAR>y</VAR>); | 1324 | double remainder(double <VAR>x</VAR>, double <VAR>y</VAR>); | 
| 1286 | float remainderf(float <VAR>x</VAR>, float <VAR>y</VAR>); | 1325 | float remainderf(float <VAR>x</VAR>, float <VAR>y</VAR>); | 
| 1287 | 1326 | ||
| 1288 | </PRE> | 1327 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1289 | |||
| 1290 | <P> | ||
| 1291 | <STRONG>Description</STRONG><BR> | ||
| 1292 | <CODE>remainder</CODE> and <CODE>remainderf</CODE> find the remainder of | 1328 | <CODE>remainder</CODE> and <CODE>remainderf</CODE> find the remainder of | 
| 1293 | <VAR>x</VAR>/<VAR>y</VAR>; this value is in the range -<VAR>y</VAR>/2 .. +<VAR>y</VAR>/2. | 1329 | <VAR>x</VAR>/<VAR>y</VAR>; this value is in the range -<VAR>y</VAR>/2 .. +<VAR>y</VAR>/2. | 
| 1294 | |||
| 1295 | |||
| 1296 | <P> | 1330 | <P> | 
| 1331 | |||
| 1297 | <BR> | 1332 | <BR> | 
| 1298 | <STRONG>Returns</STRONG><BR> | 1333 | <STRONG>Returns</STRONG><BR> | 
| 1299 | <CODE>remainder</CODE> returns the integer result as a double. | 1334 | <CODE>remainder</CODE> returns the integer result as a double. | 
| 1335 | </P><P> | ||
| 1300 | 1336 | ||
| 1301 | |||
| 1302 | <P> | ||
| 1303 | <BR> | 1337 | <BR> | 
| 1304 | <STRONG>Portability</STRONG><BR> | 1338 | <STRONG>Portability</STRONG><BR> | 
| 1305 | <CODE>remainder</CODE> is a System V release 4. | 1339 | <CODE>remainder</CODE> is a System V release 4. | 
| 1306 | <CODE>remainderf</CODE> is an extension. | 1340 | <CODE>remainderf</CODE> is an extension. | 
| 1307 | 1341 | </P><P> | |
| 1308 | 1342 | ||
| 1309 | <P> | 1343 | <BR> | 
| 1310 | <BR> | 1344 | </P><P> | 
| 1311 | 1345 | ||
| 1312 | 1346 | <A NAME="sqrt"></A> | |
| 1313 | 1347 | <HR SIZE="6"> | |
| 1314 | 1348 | <A NAME="SEC26"></A> | |
| 1315 | <H2><A NAME="SEC26" HREF="libm_toc.html#TOC26"><CODE>sqrt</CODE>, <CODE>sqrtf</CODE>---positive square root</A></H2> | 1349 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1316 | <P> | 1350 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC25"> < </A>]</TD> | 
| 1317 | <A NAME="IDX73"></A> | 1351 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC27"> > </A>]</TD> | 
| 1318 | <A NAME="IDX74"></A> | 1352 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1353 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1354 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1355 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1356 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1357 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1358 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1359 | </TR></TABLE> | ||
| 1360 | <H2> 1.25 <CODE>sqrt</CODE>, <CODE>sqrtf</CODE>---positive square root </H2> | ||
| 1361 | <!--docid::SEC26::--> | ||
| 1319 | <STRONG>Synopsis</STRONG> | 1362 | <STRONG>Synopsis</STRONG> | 
| 1320 | 1363 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1321 | <PRE> | ||
| 1322 | #include <math.h> | ||
| 1323 | double sqrt(double <VAR>x</VAR>); | 1364 | double sqrt(double <VAR>x</VAR>); | 
| 1324 | float sqrtf(float <VAR>x</VAR>); | 1365 | float sqrtf(float <VAR>x</VAR>); | 
| 1325 | 1366 | ||
| 1326 | </PRE> | 1367 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1327 | |||
| 1328 | <P> | ||
| 1329 | <STRONG>Description</STRONG><BR> | ||
| 1330 | <CODE>sqrt</CODE> computes the positive square root of the argument. | 1368 | <CODE>sqrt</CODE> computes the positive square root of the argument. | 
| 1331 | You can modify error handling for this function with | 1369 | You can modify error handling for this function with | 
| 1332 | <CODE>matherr</CODE>. | 1370 | <CODE>matherr</CODE>. | 
| 1333 | |||
| 1334 | |||
| 1335 | <P> | 1371 | <P> | 
| 1372 | |||
| 1336 | <BR> | 1373 | <BR> | 
| 1337 | <STRONG>Returns</STRONG><BR> | 1374 | <STRONG>Returns</STRONG><BR> | 
| 1338 | On success, the square root is returned. If <VAR>x</VAR> is real and | 1375 | On success, the square root is returned. If <VAR>x</VAR> is real and | 
| 1339 | positive, then the result is positive. If <VAR>x</VAR> is real and | 1376 | positive, then the result is positive. If <VAR>x</VAR> is real and | 
| 1340 | negative, the global value <CODE>errno</CODE> is set to <CODE>EDOM</CODE> (domain error). | 1377 | negative, the global value <CODE>errno</CODE> is set to <CODE>EDOM</CODE> (domain error). | 
| 1378 | </P><P> | ||
| 1341 | 1379 | ||
| 1342 | |||
| 1343 | <P> | ||
| 1344 | <BR> | 1380 | <BR> | 
| 1345 | <STRONG>Portability</STRONG><BR> | 1381 | <STRONG>Portability</STRONG><BR> | 
| 1346 | <CODE>sqrt</CODE> is ANSI C. <CODE>sqrtf</CODE> is an extension. | 1382 | <CODE>sqrt</CODE> is ANSI C. <CODE>sqrtf</CODE> is an extension. | 
| 1347 | 1383 | </P><P> | |
| 1348 | 1384 | ||
| 1349 | <P> | 1385 | <BR> | 
| 1350 | <BR> | 1386 | </P><P> | 
| 1351 | 1387 | ||
| 1352 | 1388 | <A NAME="sin"></A> | |
| 1353 | 1389 | <HR SIZE="6"> | |
| 1354 | 1390 | <A NAME="SEC27"></A> | |
| 1355 | <H2><A NAME="SEC27" HREF="libm_toc.html#TOC27"><CODE>sin</CODE>, <CODE>sinf</CODE>, <CODE>cos</CODE>, <CODE>cosf</CODE>---sine or cosine</A></H2> | 1391 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1356 | <P> | 1392 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC26"> < </A>]</TD> | 
| 1357 | <A NAME="IDX75"></A> | 1393 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC28"> > </A>]</TD> | 
| 1358 | <A NAME="IDX76"></A> | 1394 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1359 | <A NAME="IDX77"></A> | 1395 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | 
| 1360 | <A NAME="IDX78"></A> | 1396 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | 
| 1397 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1398 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1399 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1400 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1401 | </TR></TABLE> | ||
| 1402 | <H2> 1.26 <CODE>sin</CODE>, <CODE>sinf</CODE>, <CODE>cos</CODE>, <CODE>cosf</CODE>---sine or cosine </H2> | ||
| 1403 | <!--docid::SEC27::--> | ||
| 1361 | <STRONG>Synopsis</STRONG> | 1404 | <STRONG>Synopsis</STRONG> | 
| 1362 | 1405 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1363 | <PRE> | ||
| 1364 | #include <math.h> | ||
| 1365 | double sin(double <VAR>x</VAR>); | 1406 | double sin(double <VAR>x</VAR>); | 
| 1366 | float sinf(float <VAR>x</VAR>); | 1407 | float sinf(float <VAR>x</VAR>); | 
| 1367 | double cos(double <VAR>x</VAR>); | 1408 | double cos(double <VAR>x</VAR>); | 
| 1368 | float cosf(float <VAR>x</VAR>); | 1409 | float cosf(float <VAR>x</VAR>); | 
| 1369 | 1410 | ||
| 1370 | </PRE> | 1411 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1371 | |||
| 1372 | <P> | ||
| 1373 | <STRONG>Description</STRONG><BR> | ||
| 1374 | <CODE>sin</CODE> and <CODE>cos</CODE> compute (respectively) the sine and cosine | 1412 | <CODE>sin</CODE> and <CODE>cos</CODE> compute (respectively) the sine and cosine | 
| 1375 | of the argument <VAR>x</VAR>. Angles are specified in radians. | 1413 | of the argument <VAR>x</VAR>. Angles are specified in radians. | 
| 1376 | |||
| 1377 | |||
| 1378 | <P> | 1414 | <P> | 
| 1415 | |||
| 1379 | <CODE>sinf</CODE> and <CODE>cosf</CODE> are identical, save that they take and | 1416 | <CODE>sinf</CODE> and <CODE>cosf</CODE> are identical, save that they take and | 
| 1380 | return <CODE>float</CODE> values. | 1417 | return <CODE>float</CODE> values. | 
| 1418 | </P><P> | ||
| 1381 | 1419 | ||
| 1382 | |||
| 1383 | <P> | ||
| 1384 | <BR> | 1420 | <BR> | 
| 1385 | <STRONG>Returns</STRONG><BR> | 1421 | <STRONG>Returns</STRONG><BR> | 
| 1386 | The sine or cosine of <VAR>x</VAR> is returned. | 1422 | The sine or cosine of <VAR>x</VAR> is returned. | 
| 1423 | </P><P> | ||
| 1387 | 1424 | ||
| 1388 | |||
| 1389 | <P> | ||
| 1390 | <BR> | 1425 | <BR> | 
| 1391 | <STRONG>Portability</STRONG><BR> | 1426 | <STRONG>Portability</STRONG><BR> | 
| 1392 | <CODE>sin</CODE> and <CODE>cos</CODE> are ANSI C. | 1427 | <CODE>sin</CODE> and <CODE>cos</CODE> are ANSI C. | 
| 1393 | <CODE>sinf</CODE> and <CODE>cosf</CODE> are extensions. | 1428 | <CODE>sinf</CODE> and <CODE>cosf</CODE> are extensions. | 
| 1394 | 1429 | </P><P> | |
| 1395 | 1430 | ||
| 1396 | <P> | 1431 | <BR> | 
| 1397 | <BR> | 1432 | </P><P> | 
| 1398 | 1433 | ||
| 1399 | 1434 | <A NAME="sinh"></A> | |
| 1400 | 1435 | <HR SIZE="6"> | |
| 1401 | 1436 | <A NAME="SEC28"></A> | |
| 1402 | <H2><A NAME="SEC28" HREF="libm_toc.html#TOC28"><CODE>sinh</CODE>, <CODE>sinhf</CODE>---hyperbolic sine</A></H2> | 1437 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1403 | <P> | 1438 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC27"> < </A>]</TD> | 
| 1404 | <A NAME="IDX79"></A> | 1439 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC29"> > </A>]</TD> | 
| 1405 | <A NAME="IDX80"></A> | 1440 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1441 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1442 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1443 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1444 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1445 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1446 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1447 | </TR></TABLE> | ||
| 1448 | <H2> 1.27 <CODE>sinh</CODE>, <CODE>sinhf</CODE>---hyperbolic sine </H2> | ||
| 1449 | <!--docid::SEC28::--> | ||
| 1406 | <STRONG>Synopsis</STRONG> | 1450 | <STRONG>Synopsis</STRONG> | 
| 1407 | 1451 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1408 | <PRE> | ||
| 1409 | #include <math.h> | ||
| 1410 | double sinh(double <VAR>x</VAR>); | 1452 | double sinh(double <VAR>x</VAR>); | 
| 1411 | float sinhf(float <VAR>x</VAR>); | 1453 | float sinhf(float <VAR>x</VAR>); | 
| 1412 | 1454 | ||
| 1413 | </PRE> | 1455 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1414 | |||
| 1415 | <P> | ||
| 1416 | <STRONG>Description</STRONG><BR> | ||
| 1417 | <CODE>sinh</CODE> computes the hyperbolic sine of the argument <VAR>x</VAR>. | 1456 | <CODE>sinh</CODE> computes the hyperbolic sine of the argument <VAR>x</VAR>. | 
| 1418 | Angles are specified in radians. <CODE>sinh</CODE>(<VAR>x</VAR>) is defined as | 1457 | Angles are specified in radians. <CODE>sinh</CODE>(<VAR>x</VAR>) is defined as | 
| 1419 | |||
| 1420 | |||
| 1421 | <P> | 1458 | <P> | 
| 1422 | <CODE>sinhf</CODE> is identical, save that it takes and returns <CODE>float</CODE> values. | ||
| 1423 | 1459 | ||
| 1460 | <CODE>sinhf</CODE> is identical, save that it takes and returns <CODE>float</CODE> values. | ||
| 1461 | </P><P> | ||
| 1424 | 1462 | ||
| 1425 | <P> | ||
| 1426 | <BR> | 1463 | <BR> | 
| 1427 | <STRONG>Returns</STRONG><BR> | 1464 | <STRONG>Returns</STRONG><BR> | 
| 1428 | The hyperbolic sine of <VAR>x</VAR> is returned. | 1465 | The hyperbolic sine of <VAR>x</VAR> is returned. | 
| 1466 | </P><P> | ||
| 1429 | 1467 | ||
| 1430 | |||
| 1431 | <P> | ||
| 1432 | When the correct result is too large to be representable (an | 1468 | When the correct result is too large to be representable (an | 
| 1433 | overflow), <CODE>sinh</CODE> returns <CODE>HUGE_VAL</CODE> with the | 1469 | overflow), <CODE>sinh</CODE> returns <CODE>HUGE_VAL</CODE> with the | 
| 1434 | appropriate sign, and sets the global value <CODE>errno</CODE> to | 1470 | appropriate sign, and sets the global value <CODE>errno</CODE> to | 
| 1435 | <CODE>ERANGE</CODE>. | 1471 | <CODE>ERANGE</CODE>. | 
| 1472 | </P><P> | ||
| 1436 | 1473 | ||
| 1437 | |||
| 1438 | <P> | ||
| 1439 | You can modify error handling for these functions with <CODE>matherr</CODE>. | 1474 | You can modify error handling for these functions with <CODE>matherr</CODE>. | 
| 1475 | </P><P> | ||
| 1440 | 1476 | ||
| 1441 | |||
| 1442 | <P> | ||
| 1443 | <BR> | 1477 | <BR> | 
| 1444 | <STRONG>Portability</STRONG><BR> | 1478 | <STRONG>Portability</STRONG><BR> | 
| 1445 | <CODE>sinh</CODE> is ANSI C. | 1479 | <CODE>sinh</CODE> is ANSI C. | 
| 1446 | <CODE>sinhf</CODE> is an extension. | 1480 | <CODE>sinhf</CODE> is an extension. | 
| 1447 | 1481 | </P><P> | |
| 1448 | 1482 | ||
| 1449 | <P> | 1483 | <BR> | 
| 1450 | <BR> | 1484 | </P><P> | 
| 1451 | 1485 | ||
| 1452 | 1486 | <A NAME="tan"></A> | |
| 1453 | 1487 | <HR SIZE="6"> | |
| 1454 | 1488 | <A NAME="SEC29"></A> | |
| 1455 | <H2><A NAME="SEC29" HREF="libm_toc.html#TOC29"><CODE>tan</CODE>, <CODE>tanf</CODE>---tangent</A></H2> | 1489 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1456 | <P> | 1490 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC28"> < </A>]</TD> | 
| 1457 | <A NAME="IDX81"></A> | 1491 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC30"> > </A>]</TD> | 
| 1458 | <A NAME="IDX82"></A> | 1492 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1493 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1494 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1495 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1496 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1497 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1498 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1499 | </TR></TABLE> | ||
| 1500 | <H2> 1.28 <CODE>tan</CODE>, <CODE>tanf</CODE>---tangent </H2> | ||
| 1501 | <!--docid::SEC29::--> | ||
| 1459 | <STRONG>Synopsis</STRONG> | 1502 | <STRONG>Synopsis</STRONG> | 
| 1460 | 1503 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1461 | <PRE> | ||
| 1462 | #include <math.h> | ||
| 1463 | double tan(double <VAR>x</VAR>); | 1504 | double tan(double <VAR>x</VAR>); | 
| 1464 | float tanf(float <VAR>x</VAR>); | 1505 | float tanf(float <VAR>x</VAR>); | 
| 1465 | 1506 | ||
| 1466 | </PRE> | 1507 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1467 | |||
| 1468 | <P> | ||
| 1469 | <STRONG>Description</STRONG><BR> | ||
| 1470 | <CODE>tan</CODE> computes the tangent of the argument <VAR>x</VAR>. | 1508 | <CODE>tan</CODE> computes the tangent of the argument <VAR>x</VAR>. | 
| 1471 | Angles are specified in radians. | 1509 | Angles are specified in radians. | 
| 1472 | |||
| 1473 | |||
| 1474 | <P> | 1510 | <P> | 
| 1475 | <CODE>tanf</CODE> is identical, save that it takes and returns <CODE>float</CODE> values. | ||
| 1476 | 1511 | ||
| 1512 | <CODE>tanf</CODE> is identical, save that it takes and returns <CODE>float</CODE> values. | ||
| 1513 | </P><P> | ||
| 1477 | 1514 | ||
| 1478 | <P> | ||
| 1479 | <BR> | 1515 | <BR> | 
| 1480 | <STRONG>Returns</STRONG><BR> | 1516 | <STRONG>Returns</STRONG><BR> | 
| 1481 | The tangent of <VAR>x</VAR> is returned. | 1517 | The tangent of <VAR>x</VAR> is returned. | 
| 1518 | </P><P> | ||
| 1482 | 1519 | ||
| 1483 | |||
| 1484 | <P> | ||
| 1485 | <BR> | 1520 | <BR> | 
| 1486 | <STRONG>Portability</STRONG><BR> | 1521 | <STRONG>Portability</STRONG><BR> | 
| 1487 | <CODE>tan</CODE> is ANSI. <CODE>tanf</CODE> is an extension. | 1522 | <CODE>tan</CODE> is ANSI. <CODE>tanf</CODE> is an extension. | 
| 1488 | 1523 | </P><P> | |
| 1489 | 1524 | ||
| 1490 | <P> | 1525 | <BR> | 
| 1491 | <BR> | 1526 | </P><P> | 
| 1492 | 1527 | ||
| 1493 | 1528 | <A NAME="tanh"></A> | |
| 1494 | 1529 | <HR SIZE="6"> | |
| 1495 | 1530 | <A NAME="SEC30"></A> | |
| 1496 | <H2><A NAME="SEC30" HREF="libm_toc.html#TOC30"><CODE>tanh</CODE>, <CODE>tanhf</CODE>---hyperbolic tangent</A></H2> | 1531 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1497 | <P> | 1532 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC29"> < </A>]</TD> | 
| 1498 | <A NAME="IDX83"></A> | 1533 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC31"> > </A>]</TD> | 
| 1499 | <A NAME="IDX84"></A> | 1534 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1535 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1536 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1537 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1538 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1539 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1540 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1541 | </TR></TABLE> | ||
| 1542 | <H2> 1.29 <CODE>tanh</CODE>, <CODE>tanhf</CODE>---hyperbolic tangent </H2> | ||
| 1543 | <!--docid::SEC30::--> | ||
| 1500 | <STRONG>Synopsis</STRONG> | 1544 | <STRONG>Synopsis</STRONG> | 
| 1501 | 1545 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1502 | <PRE> | ||
| 1503 | #include <math.h> | ||
| 1504 | double tanh(double <VAR>x</VAR>); | 1546 | double tanh(double <VAR>x</VAR>); | 
| 1505 | float tanhf(float <VAR>x</VAR>); | 1547 | float tanhf(float <VAR>x</VAR>); | 
| 1506 | 1548 | ||
| 1507 | </PRE> | 1549 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1508 | |||
| 1509 | <P> | 1550 | <P> | 
| 1510 | <STRONG>Description</STRONG><BR> | ||
| 1511 | |||
| 1512 | 1551 | ||
| 1513 | <P> | ||
| 1514 | <CODE>tanh</CODE> computes the hyperbolic tangent of | 1552 | <CODE>tanh</CODE> computes the hyperbolic tangent of | 
| 1515 | the argument <VAR>x</VAR>. Angles are specified in radians. | 1553 | the argument <VAR>x</VAR>. Angles are specified in radians. | 
| 1554 | </P><P> | ||
| 1516 | 1555 | ||
| 1517 | |||
| 1518 | <P> | ||
| 1519 | <CODE>tanh(<VAR>x</VAR>)</CODE> is defined as | 1556 | <CODE>tanh(<VAR>x</VAR>)</CODE> is defined as | 
| 1557 | <TABLE><tr><td> </td><td class=smallexample><FONT SIZE=-1><pre> sinh(<VAR>x</VAR>)/cosh(<VAR>x</VAR>) | ||
| 1558 | </FONT></pre></td></tr></table><CODE>tanhf</CODE> is identical, save that it takes and returns <CODE>float</CODE> values. | ||
| 1559 | </P><P> | ||
| 1520 | 1560 | ||
| 1521 | <PRE> | ||
| 1522 | sinh(<VAR>x</VAR>)/cosh(<VAR>x</VAR>) | ||
| 1523 | </PRE> | ||
| 1524 | |||
| 1525 | <P> | ||
| 1526 | <CODE>tanhf</CODE> is identical, save that it takes and returns <CODE>float</CODE> values. | ||
| 1527 | |||
| 1528 | |||
| 1529 | <P> | ||
| 1530 | <BR> | 1561 | <BR> | 
| 1531 | <STRONG>Returns</STRONG><BR> | 1562 | <STRONG>Returns</STRONG><BR> | 
| 1532 | The hyperbolic tangent of <VAR>x</VAR> is returned. | 1563 | The hyperbolic tangent of <VAR>x</VAR> is returned. | 
| 1564 | </P><P> | ||
| 1533 | 1565 | ||
| 1534 | |||
| 1535 | <P> | ||
| 1536 | <BR> | 1566 | <BR> | 
| 1537 | <STRONG>Portability</STRONG><BR> | 1567 | <STRONG>Portability</STRONG><BR> | 
| 1538 | <CODE>tanh</CODE> is ANSI C. <CODE>tanhf</CODE> is an extension. | 1568 | <CODE>tanh</CODE> is ANSI C. <CODE>tanhf</CODE> is an extension. | 
| 1539 | 1569 | </P><P> | |
| 1540 | 1570 | ||
| 1541 | <P> | 1571 | <BR> | 
| 1542 | <BR> | 1572 | <A NAME="cbrt"></A> | 
| 1543 | 1573 | <HR SIZE="6"> | |
| 1544 | 1574 | <A NAME="SEC31"></A> | |
| 1545 | <H2><A NAME="SEC31" HREF="libm_toc.html#TOC31"><CODE>cbrt</CODE>, <CODE>cbrtf</CODE>---cube root</A></H2> | 1575 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1546 | <P> | 1576 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC30"> < </A>]</TD> | 
| 1547 | <A NAME="IDX85"></A> | 1577 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC32"> > </A>]</TD> | 
| 1548 | <A NAME="IDX86"></A> | 1578 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1579 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1580 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1581 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1582 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1583 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1584 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1585 | </TR></TABLE> | ||
| 1586 | <H2> 1.30 <CODE>cbrt</CODE>, <CODE>cbrtf</CODE>---cube root </H2> | ||
| 1587 | <!--docid::SEC31::--> | ||
| 1549 | <STRONG>Synopsis</STRONG> | 1588 | <STRONG>Synopsis</STRONG> | 
| 1550 | 1589 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1551 | <PRE> | ||
| 1552 | #include <math.h> | ||
| 1553 | double cbrt(double <VAR>x</VAR>); | 1590 | double cbrt(double <VAR>x</VAR>); | 
| 1554 | float cbrtf(float <VAR>x</VAR>); | 1591 | float cbrtf(float <VAR>x</VAR>); | 
| 1555 | 1592 | ||
| 1556 | </PRE> | 1593 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1557 | |||
| 1558 | <P> | ||
| 1559 | <STRONG>Description</STRONG><BR> | ||
| 1560 | <CODE>cbrt</CODE> computes the cube root of the argument. | 1594 | <CODE>cbrt</CODE> computes the cube root of the argument. | 
| 1561 | |||
| 1562 | |||
| 1563 | <P> | 1595 | <P> | 
| 1596 | |||
| 1564 | <BR> | 1597 | <BR> | 
| 1565 | <STRONG>Returns</STRONG><BR> | 1598 | <STRONG>Returns</STRONG><BR> | 
| 1566 | The cube root is returned. | 1599 | The cube root is returned. | 
| 1600 | </P><P> | ||
| 1567 | 1601 | ||
| 1568 | |||
| 1569 | <P> | ||
| 1570 | <BR> | 1602 | <BR> | 
| 1571 | <STRONG>Portability</STRONG><BR> | 1603 | <STRONG>Portability</STRONG><BR> | 
| 1572 | <CODE>cbrt</CODE> is in System V release 4. <CODE>cbrtf</CODE> is an extension. | 1604 | <CODE>cbrt</CODE> is in System V release 4. <CODE>cbrtf</CODE> is an extension. | 
| 1573 | 1605 | </P><P> | |
| 1574 | 1606 | ||
| 1575 | <P> | 1607 | <BR> | 
| 1576 | <BR> | 1608 | <A NAME="copysign"></A> | 
| 1577 | 1609 | <HR SIZE="6"> | |
| 1578 | 1610 | <A NAME="SEC32"></A> | |
| 1579 | <H2><A NAME="SEC32" HREF="libm_toc.html#TOC32"><CODE>copysign</CODE>, <CODE>copysignf</CODE>---sign of <VAR>y</VAR>, magnitude of <VAR>x</VAR></A></H2> | 1611 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1580 | <P> | 1612 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC31"> < </A>]</TD> | 
| 1581 | <A NAME="IDX87"></A> | 1613 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC33"> > </A>]</TD> | 
| 1582 | <A NAME="IDX88"></A> | 1614 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1615 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1616 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1617 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1618 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1619 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1620 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1621 | </TR></TABLE> | ||
| 1622 | <H2> 1.31 <CODE>copysign</CODE>, <CODE>copysignf</CODE>---sign of <VAR>y</VAR>, magnitude of <VAR>x</VAR> </H2> | ||
| 1623 | <!--docid::SEC32::--> | ||
| 1583 | <STRONG>Synopsis</STRONG> | 1624 | <STRONG>Synopsis</STRONG> | 
| 1584 | 1625 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1585 | <PRE> | ||
| 1586 | #include <math.h> | ||
| 1587 | double copysign (double <VAR>x</VAR>, double <VAR>y</VAR>); | 1626 | double copysign (double <VAR>x</VAR>, double <VAR>y</VAR>); | 
| 1588 | float copysignf (float <VAR>x</VAR>, float <VAR>y</VAR>); | 1627 | float copysignf (float <VAR>x</VAR>, float <VAR>y</VAR>); | 
| 1589 | 1628 | ||
| 1590 | </PRE> | 1629 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1591 | |||
| 1592 | <P> | ||
| 1593 | <STRONG>Description</STRONG><BR> | ||
| 1594 | <CODE>copysign</CODE> constructs a number with the magnitude (absolute value) | 1630 | <CODE>copysign</CODE> constructs a number with the magnitude (absolute value) | 
| 1595 | of its first argument, <VAR>x</VAR>, and the sign of its second argument, | 1631 | of its first argument, <VAR>x</VAR>, and the sign of its second argument, | 
| 1596 | <VAR>y</VAR>. | 1632 | <VAR>y</VAR>. | 
| 1597 | |||
| 1598 | |||
| 1599 | <P> | 1633 | <P> | 
| 1634 | |||
| 1600 | <CODE>copysignf</CODE> does the same thing; the two functions differ only in | 1635 | <CODE>copysignf</CODE> does the same thing; the two functions differ only in | 
| 1601 | the type of their arguments and result. | 1636 | the type of their arguments and result. | 
| 1637 | </P><P> | ||
| 1602 | 1638 | ||
| 1603 | |||
| 1604 | <P> | ||
| 1605 | <BR> | 1639 | <BR> | 
| 1606 | <STRONG>Returns</STRONG><BR> | 1640 | <STRONG>Returns</STRONG><BR> | 
| 1607 | <CODE>copysign</CODE> returns a <CODE>double</CODE> with the magnitude of | 1641 | <CODE>copysign</CODE> returns a <CODE>double</CODE> with the magnitude of | 
| 1608 | <VAR>x</VAR> and the sign of <VAR>y</VAR>. | 1642 | <VAR>x</VAR> and the sign of <VAR>y</VAR>. | 
| 1609 | <CODE>copysignf</CODE> returns a <CODE>float</CODE> with the magnitude of | 1643 | <CODE>copysignf</CODE> returns a <CODE>float</CODE> with the magnitude of | 
| 1610 | <VAR>x</VAR> and the sign of <VAR>y</VAR>. | 1644 | <VAR>x</VAR> and the sign of <VAR>y</VAR>. | 
| 1645 | </P><P> | ||
| 1611 | 1646 | ||
| 1612 | |||
| 1613 | <P> | ||
| 1614 | <BR> | 1647 | <BR> | 
| 1615 | <STRONG>Portability</STRONG><BR> | 1648 | <STRONG>Portability</STRONG><BR> | 
| 1616 | <CODE>copysign</CODE> is not required by either ANSI C or the System V Interface | 1649 | <CODE>copysign</CODE> is not required by either ANSI C or the System V Interface | 
| 1617 | Definition (Issue 2). | 1650 | Definition (Issue 2). | 
| 1618 | 1651 | </P><P> | |
| 1619 | 1652 | ||
| 1620 | <P> | 1653 | <BR> | 
| 1621 | <BR> | 1654 | <A NAME="expm1"></A> | 
| 1622 | 1655 | <HR SIZE="6"> | |
| 1623 | 1656 | <A NAME="SEC33"></A> | |
| 1624 | <H2><A NAME="SEC33" HREF="libm_toc.html#TOC33"><CODE>expm1</CODE>, <CODE>expm1f</CODE>---exponential minus 1</A></H2> | 1657 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1625 | <P> | 1658 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC32"> < </A>]</TD> | 
| 1626 | <A NAME="IDX89"></A> | 1659 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC34"> > </A>]</TD> | 
| 1627 | <A NAME="IDX90"></A> | 1660 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1661 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1662 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1663 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1664 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1665 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1666 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1667 | </TR></TABLE> | ||
| 1668 | <H2> 1.32 <CODE>expm1</CODE>, <CODE>expm1f</CODE>---exponential minus 1 </H2> | ||
| 1669 | <!--docid::SEC33::--> | ||
| 1628 | <STRONG>Synopsis</STRONG> | 1670 | <STRONG>Synopsis</STRONG> | 
| 1629 | 1671 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1630 | <PRE> | ||
| 1631 | #include <math.h> | ||
| 1632 | double expm1(double <VAR>x</VAR>); | 1672 | double expm1(double <VAR>x</VAR>); | 
| 1633 | float expm1f(float <VAR>x</VAR>); | 1673 | float expm1f(float <VAR>x</VAR>); | 
| 1634 | 1674 | ||
| 1635 | </PRE> | 1675 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1636 | |||
| 1637 | <P> | ||
| 1638 | <STRONG>Description</STRONG><BR> | ||
| 1639 | <CODE>expm1</CODE> and <CODE>expm1f</CODE> calculate the exponential of <VAR>x</VAR> | 1676 | <CODE>expm1</CODE> and <CODE>expm1f</CODE> calculate the exponential of <VAR>x</VAR> | 
| 1640 | and subtract 1, that is, | 1677 | and subtract 1, that is, | 
| 1641 | is the base of the natural system of logarithms, approximately | 1678 | is the base of the natural system of logarithms, approximately | 
| 1642 | 2.71828). The result is accurate even for small values of | 1679 | 2.71828). The result is accurate even for small values of | 
| 1643 | <VAR>x</VAR>, where using <CODE>exp(<VAR>x</VAR>)-1</CODE> would lose many | 1680 | <VAR>x</VAR>, where using <CODE>exp(<VAR>x</VAR>)-1</CODE> would lose many | 
| 1644 | significant digits. | 1681 | significant digits. | 
| 1645 | |||
| 1646 | |||
| 1647 | <P> | 1682 | <P> | 
| 1683 | |||
| 1648 | <BR> | 1684 | <BR> | 
| 1649 | <STRONG>Returns</STRONG><BR> | 1685 | <STRONG>Returns</STRONG><BR> | 
| 1650 | e raised to the power <VAR>x</VAR>, minus 1. | 1686 | e raised to the power <VAR>x</VAR>, minus 1. | 
| 1687 | </P><P> | ||
| 1651 | 1688 | ||
| 1652 | |||
| 1653 | <P> | ||
| 1654 | <BR> | 1689 | <BR> | 
| 1655 | <STRONG>Portability</STRONG><BR> | 1690 | <STRONG>Portability</STRONG><BR> | 
| 1656 | Neither <CODE>expm1</CODE> nor <CODE>expm1f</CODE> is required by ANSI C or by | 1691 | Neither <CODE>expm1</CODE> nor <CODE>expm1f</CODE> is required by ANSI C or by | 
| 1657 | the System V Interface Definition (Issue 2). | 1692 | the System V Interface Definition (Issue 2). | 
| 1658 | 1693 | </P><P> | |
| 1659 | 1694 | ||
| 1660 | <P> | 1695 | <BR> | 
| 1661 | <BR> | 1696 | <A NAME="ilogb"></A> | 
| 1662 | 1697 | <HR SIZE="6"> | |
| 1663 | 1698 | <A NAME="SEC34"></A> | |
| 1664 | <H2><A NAME="SEC34" HREF="libm_toc.html#TOC34"><CODE>ilogb</CODE>, <CODE>ilogbf</CODE>---get exponent of floating point number</A></H2> | 1699 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1665 | <P> | 1700 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC33"> < </A>]</TD> | 
| 1666 | <A NAME="IDX91"></A> | 1701 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC35"> > </A>]</TD> | 
| 1667 | <A NAME="IDX92"></A> | 1702 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1703 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1704 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1705 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1706 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1707 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1708 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1709 | </TR></TABLE> | ||
| 1710 | <H2> 1.33 <CODE>ilogb</CODE>, <CODE>ilogbf</CODE>---get exponent of floating point number </H2> | ||
| 1711 | <!--docid::SEC34::--> | ||
| 1668 | <STRONG>Synopsis</STRONG> | 1712 | <STRONG>Synopsis</STRONG> | 
| 1669 | 1713 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1670 | <PRE> | ||
| 1671 | #include <math.h> | ||
| 1672 | int ilogb(double <VAR>val</VAR>); | 1714 | int ilogb(double <VAR>val</VAR>); | 
| 1673 | int ilogbf(float <VAR>val</VAR>); | 1715 | int ilogbf(float <VAR>val</VAR>); | 
| 1674 | 1716 | ||
| 1675 | </PRE> | 1717 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1676 | |||
| 1677 | <P> | 1718 | <P> | 
| 1678 | <STRONG>Description</STRONG><BR> | ||
| 1679 | |||
| 1680 | 1719 | ||
| 1681 | <P> | ||
| 1682 | All non zero, normal numbers can be described as <VAR>m</VAR> * | 1720 | All non zero, normal numbers can be described as <VAR>m</VAR> * | 
| 1683 | 2**<VAR>p</VAR>. <CODE>ilogb</CODE> and <CODE>ilogbf</CODE> examine the argument | 1721 | 2**<VAR>p</VAR>. <CODE>ilogb</CODE> and <CODE>ilogbf</CODE> examine the argument | 
| 1684 | <VAR>val</VAR>, and return <VAR>p</VAR>. The functions <CODE>frexp</CODE> and | 1722 | <VAR>val</VAR>, and return <VAR>p</VAR>. The functions <CODE>frexp</CODE> and | 
| 1685 | <CODE>frexpf</CODE> are similar to <CODE>ilogb</CODE> and <CODE>ilogbf</CODE>, but also | 1723 | <CODE>frexpf</CODE> are similar to <CODE>ilogb</CODE> and <CODE>ilogbf</CODE>, but also | 
| 1686 | return <VAR>m</VAR>. | 1724 | return <VAR>m</VAR>. | 
| 1725 | </P><P> | ||
| 1687 | 1726 | ||
| 1688 | |||
| 1689 | <P> | ||
| 1690 | <BR> | 1727 | <BR> | 
| 1691 | <STRONG>Returns</STRONG><BR> | 1728 | <STRONG>Returns</STRONG><BR> | 
| 1729 | </P><P> | ||
| 1692 | 1730 | ||
| 1693 | |||
| 1694 | <P> | ||
| 1695 | <CODE>ilogb</CODE> and <CODE>ilogbf</CODE> return the power of two used to form the | 1731 | <CODE>ilogb</CODE> and <CODE>ilogbf</CODE> return the power of two used to form the | 
| 1696 | floating point argument. If <VAR>val</VAR> is <CODE>0</CODE>, they return <CODE>- | 1732 | floating point argument. If <VAR>val</VAR> is <CODE>0</CODE>, they return <CODE>- | 
| 1697 | INT_MAX</CODE> (<CODE>INT_MAX</CODE> is defined in limits.h). If <VAR>val</VAR> is | 1733 | INT_MAX</CODE> (<CODE>INT_MAX</CODE> is defined in limits.h). If <VAR>val</VAR> is | 
| 1698 | infinite, or NaN, they return <CODE>INT_MAX</CODE>. | 1734 | infinite, or NaN, they return <CODE>INT_MAX</CODE>. | 
| 1735 | </P><P> | ||
| 1699 | 1736 | ||
| 1700 | |||
| 1701 | <P> | ||
| 1702 | <BR> | 1737 | <BR> | 
| 1703 | <STRONG>Portability</STRONG><BR> | 1738 | <STRONG>Portability</STRONG><BR> | 
| 1704 | Neither <CODE>ilogb</CODE> nor <CODE>ilogbf</CODE> is required by ANSI C or by | 1739 | Neither <CODE>ilogb</CODE> nor <CODE>ilogbf</CODE> is required by ANSI C or by | 
| 1705 | the System V Interface Definition (Issue 2). | 1740 | the System V Interface Definition (Issue 2). | 
| 1706 | <BR> | 1741 | <BR> | 
| 1707 | 1742 | <A NAME="infinity"></A> | |
| 1708 | 1743 | <HR SIZE="6"> | |
| 1709 | <H2><A NAME="SEC35" HREF="libm_toc.html#TOC35"><CODE>infinity</CODE>, <CODE>infinityf</CODE>---representation of infinity</A></H2> | 1744 | <A NAME="SEC35"></A> | 
| 1710 | <P> | 1745 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1711 | <A NAME="IDX93"></A> | 1746 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC34"> < </A>]</TD> | 
| 1712 | <A NAME="IDX94"></A> | 1747 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC36"> > </A>]</TD> | 
| 1748 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 1749 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1750 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1751 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1752 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1753 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1754 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1755 | </TR></TABLE> | ||
| 1756 | <H2> 1.34 <CODE>infinity</CODE>, <CODE>infinityf</CODE>---representation of infinity </H2> | ||
| 1757 | <!--docid::SEC35::--> | ||
| 1713 | <STRONG>Synopsis</STRONG> | 1758 | <STRONG>Synopsis</STRONG> | 
| 1714 | 1759 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1715 | <PRE> | ||
| 1716 | #include <math.h> | ||
| 1717 | double infinity(void); | 1760 | double infinity(void); | 
| 1718 | float infinityf(void); | 1761 | float infinityf(void); | 
| 1719 | 1762 | ||
| 1720 | </PRE> | 1763 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1721 | |||
| 1722 | <P> | ||
| 1723 | <STRONG>Description</STRONG><BR> | ||
| 1724 | <CODE>infinity</CODE> and <CODE>infinityf</CODE> return the special number IEEE | 1764 | <CODE>infinity</CODE> and <CODE>infinityf</CODE> return the special number IEEE | 
| 1725 | infinity in double and single precision arithmetic | 1765 | infinity in double and single precision arithmetic | 
| 1726 | respectivly. | 1766 | respectivly. | 
| 1727 | |||
| 1728 | |||
| 1729 | <P> | 1767 | <P> | 
| 1730 | <BR> | ||
| 1731 | 1768 | ||
| 1732 | 1769 | <BR> | |
| 1733 | <H2><A NAME="SEC36" HREF="libm_toc.html#TOC36"><CODE>log1p</CODE>, <CODE>log1pf</CODE>---log of <CODE>1 + <VAR>x</VAR></CODE></A></H2> | 1770 | <A NAME="log1p"></A> | 
| 1734 | <P> | 1771 | <HR SIZE="6"> | 
| 1735 | <A NAME="IDX95"></A> | 1772 | <A NAME="SEC36"></A> | 
| 1736 | <A NAME="IDX96"></A> | 1773 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1774 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC35"> < </A>]</TD> | ||
| 1775 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC37"> > </A>]</TD> | ||
| 1776 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 1777 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1778 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1779 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1780 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1781 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1782 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1783 | </TR></TABLE> | ||
| 1784 | <H2> 1.35 <CODE>log1p</CODE>, <CODE>log1pf</CODE>---log of <CODE>1 + <VAR>x</VAR></CODE> </H2> | ||
| 1785 | <!--docid::SEC36::--> | ||
| 1737 | <STRONG>Synopsis</STRONG> | 1786 | <STRONG>Synopsis</STRONG> | 
| 1738 | 1787 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1739 | <PRE> | ||
| 1740 | #include <math.h> | ||
| 1741 | double log1p(double <VAR>x</VAR>); | 1788 | double log1p(double <VAR>x</VAR>); | 
| 1742 | float log1pf(float <VAR>x</VAR>); | 1789 | float log1pf(float <VAR>x</VAR>); | 
| 1743 | 1790 | ||
| 1744 | </PRE> | 1791 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1745 | |||
| 1746 | <P> | ||
| 1747 | <STRONG>Description</STRONG><BR> | ||
| 1748 | <CODE>log1p</CODE> calculates | 1792 | <CODE>log1p</CODE> calculates | 
| 1749 | the natural logarithm of <CODE>1+<VAR>x</VAR></CODE>. You can use <CODE>log1p</CODE> rather | 1793 | the natural logarithm of <CODE>1+<VAR>x</VAR></CODE>. You can use <CODE>log1p</CODE> rather | 
| 1750 | than `<CODE>log(1+<VAR>x</VAR>)</CODE>' for greater precision when <VAR>x</VAR> is very | 1794 | than `<CODE>log(1+<VAR>x</VAR>)</CODE>' for greater precision when <VAR>x</VAR> is very | 
| 1751 | small. | 1795 | small. | 
| 1752 | |||
| 1753 | |||
| 1754 | <P> | 1796 | <P> | 
| 1797 | |||
| 1755 | <CODE>log1pf</CODE> calculates the same thing, but accepts and returns | 1798 | <CODE>log1pf</CODE> calculates the same thing, but accepts and returns | 
| 1756 | <CODE>float</CODE> values rather than <CODE>double</CODE>. | 1799 | <CODE>float</CODE> values rather than <CODE>double</CODE>. | 
| 1800 | </P><P> | ||
| 1757 | 1801 | ||
| 1758 | |||
| 1759 | <P> | ||
| 1760 | <BR> | 1802 | <BR> | 
| 1761 | <STRONG>Returns</STRONG><BR> | 1803 | <STRONG>Returns</STRONG><BR> | 
| 1762 | <CODE>log1p</CODE> returns a <CODE>double</CODE>, the natural log of <CODE>1+<VAR>x</VAR></CODE>. | 1804 | <CODE>log1p</CODE> returns a <CODE>double</CODE>, the natural log of <CODE>1+<VAR>x</VAR></CODE>. | 
| 1763 | <CODE>log1pf</CODE> returns a <CODE>float</CODE>, the natural log of <CODE>1+<VAR>x</VAR></CODE>. | 1805 | <CODE>log1pf</CODE> returns a <CODE>float</CODE>, the natural log of <CODE>1+<VAR>x</VAR></CODE>. | 
| 1806 | </P><P> | ||
| 1764 | 1807 | ||
| 1765 | |||
| 1766 | <P> | ||
| 1767 | <BR> | 1808 | <BR> | 
| 1768 | <STRONG>Portability</STRONG><BR> | 1809 | <STRONG>Portability</STRONG><BR> | 
| 1769 | Neither <CODE>log1p</CODE> nor <CODE>log1pf</CODE> is required by ANSI C or by the System V | 1810 | Neither <CODE>log1p</CODE> nor <CODE>log1pf</CODE> is required by ANSI C or by the System V | 
| 1770 | Interface Definition (Issue 2). | 1811 | Interface Definition (Issue 2). | 
| 1771 | 1812 | </P><P> | |
| 1772 | 1813 | ||
| 1773 | <P> | 1814 | <BR> | 
| 1774 | <BR> | 1815 | <A NAME="matherr"></A> | 
| 1775 | 1816 | <HR SIZE="6"> | |
| 1776 | 1817 | <A NAME="SEC37"></A> | |
| 1777 | <H2><A NAME="SEC37" HREF="libm_toc.html#TOC37"><CODE>matherr</CODE>---modifiable math error handler</A></H2> | 1818 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1778 | <P> | 1819 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC36"> < </A>]</TD> | 
| 1779 | <A NAME="IDX97"></A> | 1820 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC38"> > </A>]</TD> | 
| 1821 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 1822 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1823 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1824 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1825 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1826 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1827 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1828 | </TR></TABLE> | ||
| 1829 | <H2> 1.36 <CODE>matherr</CODE>---modifiable math error handler </H2> | ||
| 1830 | <!--docid::SEC37::--> | ||
| 1780 | <STRONG>Synopsis</STRONG> | 1831 | <STRONG>Synopsis</STRONG> | 
| 1781 | 1832 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1782 | <PRE> | ||
| 1783 | #include <math.h> | ||
| 1784 | int matherr(struct exception *<VAR>e</VAR>); | 1833 | int matherr(struct exception *<VAR>e</VAR>); | 
| 1785 | 1834 | ||
| 1786 | </PRE> | 1835 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1787 | |||
| 1788 | <P> | ||
| 1789 | <STRONG>Description</STRONG><BR> | ||
| 1790 | <CODE>matherr</CODE> is called whenever a math library function generates an error. | 1836 | <CODE>matherr</CODE> is called whenever a math library function generates an error. | 
| 1791 | You can replace <CODE>matherr</CODE> by your own subroutine to customize | 1837 | You can replace <CODE>matherr</CODE> by your own subroutine to customize | 
| 1792 | error treatment. The customized <CODE>matherr</CODE> must return 0 if | 1838 | error treatment. The customized <CODE>matherr</CODE> must return 0 if | 
| 1793 | it fails to resolve the error, and non-zero if the error is resolved. | 1839 | it fails to resolve the error, and non-zero if the error is resolved. | 
| 1794 | |||
| 1795 | |||
| 1796 | <P> | 1840 | <P> | 
| 1841 | |||
| 1797 | When <CODE>matherr</CODE> returns a nonzero value, no error message is printed | 1842 | When <CODE>matherr</CODE> returns a nonzero value, no error message is printed | 
| 1798 | and the value of <CODE>errno</CODE> is not modified. You can accomplish either | 1843 | and the value of <CODE>errno</CODE> is not modified. You can accomplish either | 
| 1799 | or both of these things in your own <CODE>matherr</CODE> using the information | 1844 | or both of these things in your own <CODE>matherr</CODE> using the information | 
| 1800 | passed in the structure <CODE>*<VAR>e</VAR></CODE>. | 1845 | passed in the structure <CODE>*<VAR>e</VAR></CODE>. | 
| 1846 | </P><P> | ||
| 1801 | 1847 | ||
| 1802 | |||
| 1803 | <P> | ||
| 1804 | This is the <CODE>exception</CODE> structure (defined in `<CODE>math.h</CODE>'): | 1848 | This is the <CODE>exception</CODE> structure (defined in `<CODE>math.h</CODE>'): | 
| 1805 | 1849 | <TABLE><tr><td> </td><td class=smallexample><FONT SIZE=-1><pre> struct exception { | |
| 1806 | <PRE> | ||
| 1807 | struct exception { | ||
| 1808 | int type; | 1850 | int type; | 
| 1809 | char *name; | 1851 | char *name; | 
| 1810 | double arg1, arg2, retval; | 1852 | double arg1, arg2, retval; | 
| 1811 | int err; | 1853 | int err; | 
| 1812 | }; | 1854 | }; | 
| 1813 | </PRE> | 1855 | </FONT></pre></td></tr></table></P><P> | 
| 1814 | 1856 | ||
| 1815 | <P> | ||
| 1816 | The members of the exception structure have the following meanings: | 1857 | The members of the exception structure have the following meanings: | 
| 1817 | <DL COMPACT> | 1858 | <DL COMPACT> | 
| 1818 | 1859 | ||
| 1819 | <DT><CODE>type</CODE> | 1860 | <DT><CODE>type</CODE> | 
| 1820 | <DD> | 1861 | <DD>The type of mathematical error that occured; macros encoding error | 
| 1821 | The type of mathematical error that occured; macros encoding error | ||
| 1822 | types are also defined in `<CODE>math.h</CODE>'. | 1862 | types are also defined in `<CODE>math.h</CODE>'. | 
| 1863 | <P> | ||
| 1823 | 1864 | ||
| 1824 | <DT><CODE>name</CODE> | 1865 | <DT><CODE>name</CODE> | 
| 1825 | <DD> | 1866 | <DD>a pointer to a null-terminated string holding the | 
| 1826 | a pointer to a null-terminated string holding the | ||
| 1827 | name of the math library function where the error occurred. | 1867 | name of the math library function where the error occurred. | 
| 1868 | <P> | ||
| 1828 | 1869 | ||
| 1829 | <DT><CODE>arg1, arg2</CODE> | 1870 | <DT><CODE>arg1, arg2</CODE> | 
| 1830 | <DD> | 1871 | <DD>The arguments which caused the error. | 
| 1831 | The arguments which caused the error. | 1872 | <P> | 
| 1832 | 1873 | ||
| 1833 | <DT><CODE>retval</CODE> | 1874 | <DT><CODE>retval</CODE> | 
| 1834 | <DD> | 1875 | <DD>The error return value (what the calling function will return). | 
| 1835 | The error return value (what the calling function will return). | 1876 | <P> | 
| 1836 | 1877 | ||
| 1837 | <DT><CODE>err</CODE> | 1878 | <DT><CODE>err</CODE> | 
| 1838 | <DD> | 1879 | <DD>If set to be non-zero, this is the new value assigned to <CODE>errno</CODE>. | 
| 1839 | If set to be non-zero, this is the new value assigned to <CODE>errno</CODE>. | ||
| 1840 | </DL> | 1880 | </DL> | 
| 1841 | |||
| 1842 | <P> | 1881 | <P> | 
| 1882 | |||
| 1843 | The error types defined in `<CODE>math.h</CODE>' represent possible mathematical | 1883 | The error types defined in `<CODE>math.h</CODE>' represent possible mathematical | 
| 1844 | errors as follows: | 1884 | errors as follows: | 
| 1845 | 1885 | </P><P> | |
| 1846 | 1886 | ||
| 1847 | <DL COMPACT> | 1887 | <DL COMPACT> | 
| 1848 | 1888 | ||
| 1849 | <DT><CODE>DOMAIN</CODE> | 1889 | <DT><CODE>DOMAIN</CODE> | 
| 1850 | <DD> | 1890 | <DD>An argument was not in the domain of the function; e.g. <CODE>log(-1.0)</CODE>. | 
| 1851 | An argument was not in the domain of the function; e.g. <CODE>log(-1.0)</CODE>. | 1891 | <P> | 
| 1852 | 1892 | ||
| 1853 | <DT><CODE>SING</CODE> | 1893 | <DT><CODE>SING</CODE> | 
| 1854 | <DD> | 1894 | <DD>The requested calculation would result in a singularity; e.g. <CODE>pow(0.0,-2.0)</CODE> | 
| 1855 | The requested calculation would result in a singularity; e.g. <CODE>pow(0.0,-2.0)</CODE> | 1895 | <P> | 
| 1856 | 1896 | ||
| 1857 | <DT><CODE>OVERFLOW</CODE> | 1897 | <DT><CODE>OVERFLOW</CODE> | 
| 1858 | <DD> | 1898 | <DD>A calculation would produce a result too large to represent; e.g. | 
| 1859 | A calculation would produce a result too large to represent; e.g. | ||
| 1860 | <CODE>exp(1000.0)</CODE>. | 1899 | <CODE>exp(1000.0)</CODE>. | 
| 1900 | <P> | ||
| 1861 | 1901 | ||
| 1862 | <DT><CODE>UNDERFLOW</CODE> | 1902 | <DT><CODE>UNDERFLOW</CODE> | 
| 1863 | <DD> | 1903 | <DD>A calculation would produce a result too small to represent; e.g. | 
| 1864 | A calculation would produce a result too small to represent; e.g. | ||
| 1865 | <CODE>exp(-1000.0)</CODE>. | 1904 | <CODE>exp(-1000.0)</CODE>. | 
| 1905 | <P> | ||
| 1866 | 1906 | ||
| 1867 | <DT><CODE>TLOSS</CODE> | 1907 | <DT><CODE>TLOSS</CODE> | 
| 1868 | <DD> | 1908 | <DD>Total loss of precision. The result would have no significant digits; | 
| 1869 | Total loss of precision. The result would have no significant digits; | ||
| 1870 | e.g. <CODE>sin(10e70)</CODE>. | 1909 | e.g. <CODE>sin(10e70)</CODE>. | 
| 1910 | <P> | ||
| 1871 | 1911 | ||
| 1872 | <DT><CODE>PLOSS</CODE> | 1912 | <DT><CODE>PLOSS</CODE> | 
| 1873 | <DD> | 1913 | <DD>Partial loss of precision. | 
| 1874 | Partial loss of precision. | ||
| 1875 | </DL> | 1914 | </DL> | 
| 1876 | |||
| 1877 | <P> | 1915 | <P> | 
| 1916 | |||
| 1878 | <BR> | 1917 | <BR> | 
| 1879 | <STRONG>Returns</STRONG><BR> | 1918 | <STRONG>Returns</STRONG><BR> | 
| 1880 | The library definition for <CODE>matherr</CODE> returns <CODE>0</CODE> in all cases. | 1919 | The library definition for <CODE>matherr</CODE> returns <CODE>0</CODE> in all cases. | 
| 1920 | </P><P> | ||
| 1881 | 1921 | ||
| 1882 | |||
| 1883 | <P> | ||
| 1884 | You can change the calling function's result from a customized <CODE>matherr</CODE> | 1922 | You can change the calling function's result from a customized <CODE>matherr</CODE> | 
| 1885 | by modifying <CODE>e->retval</CODE>, which propagates backs to the caller. | 1923 | by modifying <CODE>e->retval</CODE>, which propagates backs to the caller. | 
| 1924 | </P><P> | ||
| 1886 | 1925 | ||
| 1887 | |||
| 1888 | <P> | ||
| 1889 | If <CODE>matherr</CODE> returns <CODE>0</CODE> (indicating that it was not able to resolve | 1926 | If <CODE>matherr</CODE> returns <CODE>0</CODE> (indicating that it was not able to resolve | 
| 1890 | the error) the caller sets <CODE>errno</CODE> to an appropriate value, and prints | 1927 | the error) the caller sets <CODE>errno</CODE> to an appropriate value, and prints | 
| 1891 | an error message. | 1928 | an error message. | 
| 1929 | </P><P> | ||
| 1892 | 1930 | ||
| 1893 | |||
| 1894 | <P> | ||
| 1895 | <BR> | 1931 | <BR> | 
| 1896 | <STRONG>Portability</STRONG><BR> | 1932 | <STRONG>Portability</STRONG><BR> | 
| 1897 | <CODE>matherr</CODE> is not ANSI C. | 1933 | <CODE>matherr</CODE> is not ANSI C. | 
| 1898 | 1934 | </P><P> | |
| 1899 | 1935 | ||
| 1900 | <P> | 1936 | <BR> | 
| 1901 | <BR> | 1937 | <A NAME="modf"></A> | 
| 1902 | 1938 | <HR SIZE="6"> | |
| 1903 | 1939 | <A NAME="SEC38"></A> | |
| 1904 | <H2><A NAME="SEC38" HREF="libm_toc.html#TOC38"><CODE>modf</CODE>, <CODE>modff</CODE>---split fractional and integer parts</A></H2> | 1940 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1905 | <P> | 1941 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC37"> < </A>]</TD> | 
| 1906 | <A NAME="IDX98"></A> | 1942 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC39"> > </A>]</TD> | 
| 1907 | <A NAME="IDX99"></A> | 1943 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1944 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1945 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1946 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1947 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1948 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1949 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1950 | </TR></TABLE> | ||
| 1951 | <H2> 1.37 <CODE>modf</CODE>, <CODE>modff</CODE>---split fractional and integer parts </H2> | ||
| 1952 | <!--docid::SEC38::--> | ||
| 1908 | <STRONG>Synopsis</STRONG> | 1953 | <STRONG>Synopsis</STRONG> | 
| 1909 | 1954 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1910 | <PRE> | ||
| 1911 | #include <math.h> | ||
| 1912 | double modf(double <VAR>val</VAR>, double *<VAR>ipart</VAR>); | 1955 | double modf(double <VAR>val</VAR>, double *<VAR>ipart</VAR>); | 
| 1913 | float modff(float <VAR>val</VAR>, float *<VAR>ipart</VAR>); | 1956 | float modff(float <VAR>val</VAR>, float *<VAR>ipart</VAR>); | 
| 1914 | 1957 | ||
| 1915 | </PRE> | 1958 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1916 | |||
| 1917 | <P> | ||
| 1918 | <STRONG>Description</STRONG><BR> | ||
| 1919 | <CODE>modf</CODE> splits the double <VAR>val</VAR> apart into an integer part | 1959 | <CODE>modf</CODE> splits the double <VAR>val</VAR> apart into an integer part | 
| 1920 | and a fractional part, returning the fractional part and | 1960 | and a fractional part, returning the fractional part and | 
| 1921 | storing the integer part in <CODE>*<VAR>ipart</VAR></CODE>. No rounding | 1961 | storing the integer part in <CODE>*<VAR>ipart</VAR></CODE>. No rounding | 
| @@ -1925,357 +1965,400 @@ is, if . <VAR>realpart</VAR> = modf(<VAR>val</VAR>, &<VAR>intpart</VAR>); th | |||
| 1925 | `<CODE><VAR>realpart</VAR>+<VAR>intpart</VAR></CODE>' is the same as <VAR>val</VAR>. | 1965 | `<CODE><VAR>realpart</VAR>+<VAR>intpart</VAR></CODE>' is the same as <VAR>val</VAR>. | 
| 1926 | <CODE>modff</CODE> is identical, save that it takes and returns | 1966 | <CODE>modff</CODE> is identical, save that it takes and returns | 
| 1927 | <CODE>float</CODE> rather than <CODE>double</CODE> values. | 1967 | <CODE>float</CODE> rather than <CODE>double</CODE> values. | 
| 1928 | |||
| 1929 | |||
| 1930 | <P> | 1968 | <P> | 
| 1969 | |||
| 1931 | <BR> | 1970 | <BR> | 
| 1932 | <STRONG>Returns</STRONG><BR> | 1971 | <STRONG>Returns</STRONG><BR> | 
| 1933 | The fractional part is returned. Each result has the same | 1972 | The fractional part is returned. Each result has the same | 
| 1934 | sign as the supplied argument <VAR>val</VAR>. | 1973 | sign as the supplied argument <VAR>val</VAR>. | 
| 1974 | </P><P> | ||
| 1935 | 1975 | ||
| 1936 | |||
| 1937 | <P> | ||
| 1938 | <BR> | 1976 | <BR> | 
| 1939 | <STRONG>Portability</STRONG><BR> | 1977 | <STRONG>Portability</STRONG><BR> | 
| 1940 | <CODE>modf</CODE> is ANSI C. <CODE>modff</CODE> is an extension. | 1978 | <CODE>modf</CODE> is ANSI C. <CODE>modff</CODE> is an extension. | 
| 1941 | 1979 | </P><P> | |
| 1942 | 1980 | ||
| 1943 | <P> | 1981 | <BR> | 
| 1944 | <BR> | 1982 | <A NAME="nan"></A> | 
| 1945 | 1983 | <HR SIZE="6"> | |
| 1946 | 1984 | <A NAME="SEC39"></A> | |
| 1947 | <H2><A NAME="SEC39" HREF="libm_toc.html#TOC39"><CODE>nan</CODE>, <CODE>nanf</CODE>---representation of infinity</A></H2> | 1985 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 1948 | <P> | 1986 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC38"> < </A>]</TD> | 
| 1949 | <A NAME="IDX100"></A> | 1987 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC40"> > </A>]</TD> | 
| 1950 | <A NAME="IDX101"></A> | 1988 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 1989 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 1990 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 1991 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 1992 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 1993 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 1994 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 1995 | </TR></TABLE> | ||
| 1996 | <H2> 1.38 <CODE>nan</CODE>, <CODE>nanf</CODE>---representation of infinity </H2> | ||
| 1997 | <!--docid::SEC39::--> | ||
| 1951 | <STRONG>Synopsis</STRONG> | 1998 | <STRONG>Synopsis</STRONG> | 
| 1952 | 1999 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1953 | <PRE> | ||
| 1954 | #include <math.h> | ||
| 1955 | double nan(void); | 2000 | double nan(void); | 
| 1956 | float nanf(void); | 2001 | float nanf(void); | 
| 1957 | 2002 | ||
| 1958 | </PRE> | 2003 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1959 | |||
| 1960 | <P> | ||
| 1961 | <STRONG>Description</STRONG><BR> | ||
| 1962 | <CODE>nan</CODE> and <CODE>nanf</CODE> return an IEEE NaN (Not a Number) in | 2004 | <CODE>nan</CODE> and <CODE>nanf</CODE> return an IEEE NaN (Not a Number) in | 
| 1963 | double and single precision arithmetic respectivly. | 2005 | double and single precision arithmetic respectivly. | 
| 1964 | |||
| 1965 | |||
| 1966 | <P> | 2006 | <P> | 
| 1967 | <BR> | ||
| 1968 | |||
| 1969 | 2007 | ||
| 1970 | <H2><A NAME="SEC40" HREF="libm_toc.html#TOC40"><CODE>nextafter</CODE>, <CODE>nextafterf</CODE>---get next number</A></H2> | 2008 | <BR> | 
| 1971 | <P> | 2009 | <A NAME="nextafter"></A> | 
| 1972 | <A NAME="IDX102"></A> | 2010 | <HR SIZE="6"> | 
| 1973 | <A NAME="IDX103"></A> | 2011 | <A NAME="SEC40"></A> | 
| 2012 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
| 2013 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC39"> < </A>]</TD> | ||
| 2014 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC41"> > </A>]</TD> | ||
| 2015 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 2016 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 2017 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 2018 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 2019 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 2020 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 2021 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 2022 | </TR></TABLE> | ||
| 2023 | <H2> 1.39 <CODE>nextafter</CODE>, <CODE>nextafterf</CODE>---get next number </H2> | ||
| 2024 | <!--docid::SEC40::--> | ||
| 1974 | <STRONG>Synopsis</STRONG> | 2025 | <STRONG>Synopsis</STRONG> | 
| 1975 | 2026 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 1976 | <PRE> | ||
| 1977 | #include <math.h> | ||
| 1978 | double nextafter(double <VAR>val</VAR>, double <VAR>dir</VAR>); | 2027 | double nextafter(double <VAR>val</VAR>, double <VAR>dir</VAR>); | 
| 1979 | float nextafterf(float <VAR>val</VAR>, float <VAR>dir</VAR>); | 2028 | float nextafterf(float <VAR>val</VAR>, float <VAR>dir</VAR>); | 
| 1980 | 2029 | ||
| 1981 | </PRE> | 2030 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 1982 | |||
| 1983 | <P> | ||
| 1984 | <STRONG>Description</STRONG><BR> | ||
| 1985 | <CODE>nextafter</CODE> returns the double) precision floating point number | 2031 | <CODE>nextafter</CODE> returns the double) precision floating point number | 
| 1986 | closest to <VAR>val</VAR> in the direction toward <VAR>dir</VAR>. <CODE>nextafterf</CODE> | 2032 | closest to <VAR>val</VAR> in the direction toward <VAR>dir</VAR>. <CODE>nextafterf</CODE> | 
| 1987 | performs the same operation in single precision. For example, | 2033 | performs the same operation in single precision. For example, | 
| 1988 | <CODE>nextafter(0.0,1.0)</CODE> returns the smallest positive number which is | 2034 | <CODE>nextafter(0.0,1.0)</CODE> returns the smallest positive number which is | 
| 1989 | representable in double precision. | 2035 | representable in double precision. | 
| 1990 | |||
| 1991 | |||
| 1992 | <P> | 2036 | <P> | 
| 2037 | |||
| 1993 | <BR> | 2038 | <BR> | 
| 1994 | <STRONG>Returns</STRONG><BR> | 2039 | <STRONG>Returns</STRONG><BR> | 
| 1995 | Returns the next closest number to <VAR>val</VAR> in the direction toward | 2040 | Returns the next closest number to <VAR>val</VAR> in the direction toward | 
| 1996 | <VAR>dir</VAR>. | 2041 | <VAR>dir</VAR>. | 
| 2042 | </P><P> | ||
| 1997 | 2043 | ||
| 1998 | |||
| 1999 | <P> | ||
| 2000 | <BR> | 2044 | <BR> | 
| 2001 | <STRONG>Portability</STRONG><BR> | 2045 | <STRONG>Portability</STRONG><BR> | 
| 2002 | Neither <CODE>nextafter</CODE> nor <CODE>nextafterf</CODE> is required by ANSI C | 2046 | Neither <CODE>nextafter</CODE> nor <CODE>nextafterf</CODE> is required by ANSI C | 
| 2003 | or by the System V Interface Definition (Issue 2). | 2047 | or by the System V Interface Definition (Issue 2). | 
| 2004 | 2048 | </P><P> | |
| 2005 | 2049 | ||
| 2006 | <P> | 2050 | <BR> | 
| 2007 | <BR> | 2051 | <A NAME="scalbn"></A> | 
| 2008 | 2052 | <HR SIZE="6"> | |
| 2009 | 2053 | <A NAME="SEC41"></A> | |
| 2010 | <H2><A NAME="SEC41" HREF="libm_toc.html#TOC41"><CODE>scalbn</CODE>, <CODE>scalbnf</CODE>---scale by integer</A></H2> | 2054 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 2011 | <P> | 2055 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC40"> < </A>]</TD> | 
| 2012 | <A NAME="IDX104"></A> | 2056 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC42"> > </A>]</TD> | 
| 2013 | <A NAME="IDX105"></A> | 2057 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 2058 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 2059 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 2060 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 2061 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 2062 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 2063 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 2064 | </TR></TABLE> | ||
| 2065 | <H2> 1.40 <CODE>scalbn</CODE>, <CODE>scalbnf</CODE>---scale by integer </H2> | ||
| 2066 | <!--docid::SEC41::--> | ||
| 2014 | <STRONG>Synopsis</STRONG> | 2067 | <STRONG>Synopsis</STRONG> | 
| 2015 | 2068 | <TABLE><tr><td> </td><td class=example><pre>#include <math.h> | |
| 2016 | <PRE> | ||
| 2017 | #include <math.h> | ||
| 2018 | double scalbn(double <VAR>x</VAR>, int <VAR>y</VAR>); | 2069 | double scalbn(double <VAR>x</VAR>, int <VAR>y</VAR>); | 
| 2019 | float scalbnf(float <VAR>x</VAR>, int <VAR>y</VAR>); | 2070 | float scalbnf(float <VAR>x</VAR>, int <VAR>y</VAR>); | 
| 2020 | 2071 | ||
| 2021 | </PRE> | 2072 | </pre></td></tr></table><STRONG>Description</STRONG><BR> | 
| 2022 | |||
| 2023 | <P> | ||
| 2024 | <STRONG>Description</STRONG><BR> | ||
| 2025 | <CODE>scalbn</CODE> and <CODE>scalbnf</CODE> scale <VAR>x</VAR> by <VAR>n</VAR>, returning <VAR>x</VAR> times | 2073 | <CODE>scalbn</CODE> and <CODE>scalbnf</CODE> scale <VAR>x</VAR> by <VAR>n</VAR>, returning <VAR>x</VAR> times | 
| 2026 | 2 to the power <VAR>n</VAR>. The result is computed by manipulating the | 2074 | 2 to the power <VAR>n</VAR>. The result is computed by manipulating the | 
| 2027 | exponent, rather than by actually performing an exponentiation or | 2075 | exponent, rather than by actually performing an exponentiation or | 
| 2028 | multiplication. | 2076 | multiplication. | 
| 2029 | |||
| 2030 | |||
| 2031 | <P> | 2077 | <P> | 
| 2078 | |||
| 2032 | <BR> | 2079 | <BR> | 
| 2033 | <STRONG>Returns</STRONG><BR> | 2080 | <STRONG>Returns</STRONG><BR> | 
| 2034 | <VAR>x</VAR> times 2 to the power <VAR>n</VAR>. | 2081 | <VAR>x</VAR> times 2 to the power <VAR>n</VAR>. | 
| 2082 | </P><P> | ||
| 2035 | 2083 | ||
| 2036 | |||
| 2037 | <P> | ||
| 2038 | <BR> | 2084 | <BR> | 
| 2039 | <STRONG>Portability</STRONG><BR> | 2085 | <STRONG>Portability</STRONG><BR> | 
| 2040 | Neither <CODE>scalbn</CODE> nor <CODE>scalbnf</CODE> is required by ANSI C or by the System V | 2086 | Neither <CODE>scalbn</CODE> nor <CODE>scalbnf</CODE> is required by ANSI C or by the System V | 
| 2041 | Interface Definition (Issue 2). | 2087 | Interface Definition (Issue 2). | 
| 2088 | </P><P> | ||
| 2042 | 2089 | ||
| 2043 | |||
| 2044 | <P> | ||
| 2045 | <BR> | 2090 | <BR> | 
| 2091 | </P><P> | ||
| 2046 | 2092 | ||
| 2047 | 2093 | <A NAME="Reentrancy"></A> | |
| 2048 | 2094 | <HR SIZE="6"> | |
| 2049 | 2095 | <A NAME="SEC42"></A> | |
| 2050 | <H1><A NAME="SEC42" HREF="libm_toc.html#TOC42">Reentrancy Properties of <CODE>libm</CODE></A></H1> | 2096 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 2051 | 2097 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC41"> < </A>]</TD> | |
| 2098 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43"> > </A>]</TD> | ||
| 2099 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
| 2100 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | ||
| 2101 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
| 2102 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | ||
| 2103 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | ||
| 2104 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | ||
| 2105 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | ||
| 2106 | </TR></TABLE> | ||
| 2107 | <H1> 2. Reentrancy Properties of <CODE>libm</CODE> </H1> | ||
| 2108 | <!--docid::SEC42::--> | ||
| 2052 | <P> | 2109 | <P> | 
| 2053 | <A NAME="IDX106"></A> | 2110 | |
| 2054 | <A NAME="IDX107"></A> | 2111 | <A NAME="IDX5"></A> | 
| 2112 | <A NAME="IDX6"></A> | ||
| 2055 | When a libm function detects an exceptional case, <CODE>errno</CODE> may be | 2113 | When a libm function detects an exceptional case, <CODE>errno</CODE> may be | 
| 2056 | set, the <CODE>matherr</CODE> function may be called, and a error message | 2114 | set, the <CODE>matherr</CODE> function may be called, and a error message | 
| 2057 | may be written to the standard error stream. This behavior may not | 2115 | may be written to the standard error stream. This behavior may not | 
| 2058 | be reentrant. | 2116 | be reentrant. | 
| 2117 | </P><P> | ||
| 2059 | 2118 | ||
| 2060 | |||
| 2061 | <P> | ||
| 2062 | With reentrant C libraries like the Red Hat newlib C library, <CODE>errno</CODE> is | 2119 | With reentrant C libraries like the Red Hat newlib C library, <CODE>errno</CODE> is | 
| 2063 | a macro which expands to the per-thread error value. This makes it thread | 2120 | a macro which expands to the per-thread error value. This makes it thread | 
| 2064 | safe. | 2121 | safe. | 
| 2122 | </P><P> | ||
| 2065 | 2123 | ||
| 2066 | |||
| 2067 | <P> | ||
| 2068 | When the user provides his own <CODE>matherr</CODE> function it must be | 2124 | When the user provides his own <CODE>matherr</CODE> function it must be | 
| 2069 | reentrant for the math library as a whole to be reentrant. | 2125 | reentrant for the math library as a whole to be reentrant. | 
| 2126 | </P><P> | ||
| 2070 | 2127 | ||
| 2071 | |||
| 2072 | <P> | ||
| 2073 | In normal debugged programs, there are usually no math subroutine | 2128 | In normal debugged programs, there are usually no math subroutine | 
| 2074 | errors--and therefore no assignments to <CODE>errno</CODE> and no <CODE>matherr</CODE> | 2129 | errors--and therefore no assignments to <CODE>errno</CODE> and no <CODE>matherr</CODE> | 
| 2075 | calls; in that situation, the math functions behave reentrantly. | 2130 | calls; in that situation, the math functions behave reentrantly. | 
| 2076 | 2131 | </P><P> | |
| 2077 | 2132 | ||
| 2078 | 2133 | <A NAME="Index"></A> | |
| 2079 | 2134 | <HR SIZE="6"> | |
| 2080 | <H1><A NAME="SEC43" HREF="libm_toc.html#TOC43">Index</A></H1> | 2135 | <A NAME="SEC43"></A> | 
| 2081 | <P> | 2136 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | 
| 2082 | Jump to: | 2137 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC42"> < </A>]</TD> | 
| 2083 | <A HREF="#cindex_a">a</A> | 2138 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ > ]</TD> | 
| 2084 | - | 2139 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | 
| 2085 | <A HREF="#cindex_c">c</A> | 2140 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1"> Up </A>]</TD> | 
| 2086 | - | 2141 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | 
| 2087 | <A HREF="#cindex_e">e</A> | 2142 | <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">   <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC1">Top</A>]</TD> | 
| 2088 | - | 2143 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm_toc.html#SEC_Contents">Contents</A>]</TD> | 
| 2089 | <A HREF="#cindex_f">f</A> | 2144 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC43">Index</A>]</TD> | 
| 2090 | - | 2145 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="libm.html#SEC_About"> ? </A>]</TD> | 
| 2091 | <A HREF="#cindex_g">g</A> | 2146 | </TR></TABLE> | 
| 2092 | - | 2147 | <H1> Index </H1> | 
| 2093 | <A HREF="#cindex_h">h</A> | 2148 | <!--docid::SEC43::--> | 
| 2094 | - | 2149 | <table><tr><th valign=top>Jump to:   </th><td><A HREF="libm.html#cp_A" style="text-decoration:none"><b>A</b></A> | 
| 2095 | <A HREF="#cindex_i">i</A> | 2150 |   | 
| 2096 | - | 2151 | <A HREF="libm.html#cp_C" style="text-decoration:none"><b>C</b></A> | 
| 2097 | <A HREF="#cindex_j">j</A> | 2152 |   | 
| 2098 | - | 2153 | <A HREF="libm.html#cp_E" style="text-decoration:none"><b>E</b></A> | 
| 2099 | <A HREF="#cindex_l">l</A> | 2154 |   | 
| 2100 | - | 2155 | <A HREF="libm.html#cp_F" style="text-decoration:none"><b>F</b></A> | 
| 2101 | <A HREF="#cindex_m">m</A> | 2156 |   | 
| 2102 | - | 2157 | <A HREF="libm.html#cp_G" style="text-decoration:none"><b>G</b></A> | 
| 2103 | <A HREF="#cindex_n">n</A> | 2158 |   | 
| 2104 | - | 2159 | <A HREF="libm.html#cp_H" style="text-decoration:none"><b>H</b></A> | 
| 2105 | <A HREF="#cindex_o">o</A> | 2160 |   | 
| 2106 | - | 2161 | <A HREF="libm.html#cp_I" style="text-decoration:none"><b>I</b></A> | 
| 2107 | <A HREF="#cindex_p">p</A> | 2162 |   | 
| 2108 | - | 2163 | <A HREF="libm.html#cp_J" style="text-decoration:none"><b>J</b></A> | 
| 2109 | <A HREF="#cindex_r">r</A> | 2164 |   | 
| 2110 | - | 2165 | <A HREF="libm.html#cp_L" style="text-decoration:none"><b>L</b></A> | 
| 2111 | <A HREF="#cindex_s">s</A> | 2166 |   | 
| 2112 | - | 2167 | <A HREF="libm.html#cp_M" style="text-decoration:none"><b>M</b></A> | 
| 2113 | <A HREF="#cindex_t">t</A> | 2168 |   | 
| 2114 | - | 2169 | <A HREF="libm.html#cp_N" style="text-decoration:none"><b>N</b></A> | 
| 2115 | <A HREF="#cindex_y">y</A> | 2170 |   | 
| 2116 | <P> | 2171 | <A HREF="libm.html#cp_O" style="text-decoration:none"><b>O</b></A> | 
| 2117 | <H2><A NAME="cindex_a">a</A></H2> | 2172 |   | 
| 2118 | <DIR> | 2173 | <A HREF="libm.html#cp_P" style="text-decoration:none"><b>P</b></A> | 
| 2119 | <LI><A HREF="libm.html#IDX5">acos</A> | 2174 |   | 
| 2120 | <LI><A HREF="libm.html#IDX6">acosf</A> | 2175 | <A HREF="libm.html#cp_R" style="text-decoration:none"><b>R</b></A> | 
| 2121 | <LI><A HREF="libm.html#IDX7">acosh</A> | 2176 |   | 
| 2122 | <LI><A HREF="libm.html#IDX8">acoshf</A> | 2177 | <A HREF="libm.html#cp_S" style="text-decoration:none"><b>S</b></A> | 
| 2123 | <LI><A HREF="libm.html#IDX9">asin</A> | 2178 |   | 
| 2124 | <LI><A HREF="libm.html#IDX10">asinf</A> | 2179 | <A HREF="libm.html#cp_T" style="text-decoration:none"><b>T</b></A> | 
| 2125 | <LI><A HREF="libm.html#IDX11">asinh</A> | 2180 |   | 
| 2126 | <LI><A HREF="libm.html#IDX12">asinhf</A> | 2181 | <A HREF="libm.html#cp_Y" style="text-decoration:none"><b>Y</b></A> | 
| 2127 | <LI><A HREF="libm.html#IDX13">atan</A> | 2182 |   | 
| 2128 | <LI><A HREF="libm.html#IDX15">atan2</A> | 2183 | </td></tr></table><br><P></P> | 
| 2129 | <LI><A HREF="libm.html#IDX16">atan2f</A> | 2184 | <TABLE border=0> | 
| 2130 | <LI><A HREF="libm.html#IDX14">atanf</A> | 2185 | <TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR> | 
| 2131 | <LI><A HREF="libm.html#IDX17">atanh</A> | 2186 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2132 | <LI><A HREF="libm.html#IDX18">atanhf</A> | 2187 | <TR><TH><A NAME="cp_A"></A>A</TH><TD></TD><TD></TD></TR> | 
| 2133 | </DIR> | 2188 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC3"><CODE>acos</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC3">1.2 <CODE>acos</CODE>, <CODE>acosf</CODE>---arc cosine</A></TD></TR> | 
| 2134 | <H2><A NAME="cindex_c">c</A></H2> | 2189 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC3"><CODE>acosf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC3">1.2 <CODE>acos</CODE>, <CODE>acosf</CODE>---arc cosine</A></TD></TR> | 
| 2135 | <DIR> | 2190 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC4"><CODE>acosh</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC4">1.3 <CODE>acosh</CODE>, <CODE>acoshf</CODE>---inverse hyperbolic cosine</A></TD></TR> | 
| 2136 | <LI><A HREF="libm.html#IDX85">cbrt</A> | 2191 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC4"><CODE>acoshf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC4">1.3 <CODE>acosh</CODE>, <CODE>acoshf</CODE>---inverse hyperbolic cosine</A></TD></TR> | 
| 2137 | <LI><A HREF="libm.html#IDX86">cbrtf</A> | 2192 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC5"><CODE>asin</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC5">1.4 <CODE>asin</CODE>, <CODE>asinf</CODE>---arc sine</A></TD></TR> | 
| 2138 | <LI><A HREF="libm.html#IDX41">ceil</A> | 2193 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC5"><CODE>asinf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC5">1.4 <CODE>asin</CODE>, <CODE>asinf</CODE>---arc sine</A></TD></TR> | 
| 2139 | <LI><A HREF="libm.html#IDX42">ceilf</A> | 2194 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC6"><CODE>asinh</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC6">1.5 <CODE>asinh</CODE>, <CODE>asinhf</CODE>---inverse hyperbolic sine</A></TD></TR> | 
| 2140 | <LI><A HREF="libm.html#IDX87">copysign</A> | 2195 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC6"><CODE>asinhf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC6">1.5 <CODE>asinh</CODE>, <CODE>asinhf</CODE>---inverse hyperbolic sine</A></TD></TR> | 
| 2141 | <LI><A HREF="libm.html#IDX88">copysignf</A> | 2196 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC7"><CODE>atan</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC7">1.6 <CODE>atan</CODE>, <CODE>atanf</CODE>---arc tangent</A></TD></TR> | 
| 2142 | <LI><A HREF="libm.html#IDX77">cos</A> | 2197 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC8"><CODE>atan2</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC8">1.7 <CODE>atan2</CODE>, <CODE>atan2f</CODE>---arc tangent of y/x</A></TD></TR> | 
| 2143 | <LI><A HREF="libm.html#IDX78">cosf</A> | 2198 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC8"><CODE>atan2f</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC8">1.7 <CODE>atan2</CODE>, <CODE>atan2f</CODE>---arc tangent of y/x</A></TD></TR> | 
| 2144 | </DIR> | 2199 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC7"><CODE>atanf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC7">1.6 <CODE>atan</CODE>, <CODE>atanf</CODE>---arc tangent</A></TD></TR> | 
| 2145 | <H2><A NAME="cindex_e">e</A></H2> | 2200 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC9"><CODE>atanh</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC9">1.8 <CODE>atanh</CODE>, <CODE>atanhf</CODE>---inverse hyperbolic tangent</A></TD></TR> | 
| 2146 | <DIR> | 2201 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC9"><CODE>atanhf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC9">1.8 <CODE>atanh</CODE>, <CODE>atanhf</CODE>---inverse hyperbolic tangent</A></TD></TR> | 
| 2147 | <LI><A HREF="libm.html#IDX31">erf</A> | 2202 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2148 | <LI><A HREF="libm.html#IDX33">erfc</A> | 2203 | <TR><TH><A NAME="cp_C"></A>C</TH><TD></TD><TD></TD></TR> | 
| 2149 | <LI><A HREF="libm.html#IDX34">erfcf</A> | 2204 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC31"><CODE>cbrt</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC31">1.30 <CODE>cbrt</CODE>, <CODE>cbrtf</CODE>---cube root</A></TD></TR> | 
| 2150 | <LI><A HREF="libm.html#IDX32">erff</A> | 2205 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC31"><CODE>cbrtf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC31">1.30 <CODE>cbrt</CODE>, <CODE>cbrtf</CODE>---cube root</A></TD></TR> | 
| 2151 | <LI><A HREF="libm.html#IDX35">exp</A> | 2206 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC15"><CODE>ceil</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC15">1.14 <CODE>floor</CODE>, <CODE>floorf</CODE>, <CODE>ceil</CODE>, <CODE>ceilf</CODE>---floor and ceiling</A></TD></TR> | 
| 2152 | <LI><A HREF="libm.html#IDX36">expf</A> | 2207 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC15"><CODE>ceilf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC15">1.14 <CODE>floor</CODE>, <CODE>floorf</CODE>, <CODE>ceil</CODE>, <CODE>ceilf</CODE>---floor and ceiling</A></TD></TR> | 
| 2153 | <LI><A HREF="libm.html#IDX89">expm1</A> | 2208 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC32"><CODE>copysign</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC32">1.31 <CODE>copysign</CODE>, <CODE>copysignf</CODE>---sign of <VAR>y</VAR>, magnitude of <VAR>x</VAR></A></TD></TR> | 
| 2154 | <LI><A HREF="libm.html#IDX90">expm1f</A> | 2209 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC32"><CODE>copysignf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC32">1.31 <CODE>copysign</CODE>, <CODE>copysignf</CODE>---sign of <VAR>y</VAR>, magnitude of <VAR>x</VAR></A></TD></TR> | 
| 2155 | </DIR> | 2210 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC27"><CODE>cos</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC27">1.26 <CODE>sin</CODE>, <CODE>sinf</CODE>, <CODE>cos</CODE>, <CODE>cosf</CODE>---sine or cosine</A></TD></TR> | 
| 2156 | <H2><A NAME="cindex_f">f</A></H2> | 2211 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC27"><CODE>cosf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC27">1.26 <CODE>sin</CODE>, <CODE>sinf</CODE>, <CODE>cos</CODE>, <CODE>cosf</CODE>---sine or cosine</A></TD></TR> | 
| 2157 | <DIR> | 2212 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2158 | <LI><A HREF="libm.html#IDX37">fabs</A> | 2213 | <TR><TH><A NAME="cp_E"></A>E</TH><TD></TD><TD></TD></TR> | 
| 2159 | <LI><A HREF="libm.html#IDX38">fabsf</A> | 2214 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC12"><CODE>erf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC12">1.11 <CODE>erf</CODE>, <CODE>erff</CODE>, <CODE>erfc</CODE>, <CODE>erfcf</CODE>---error function</A></TD></TR> | 
| 2160 | <LI><A HREF="libm.html#IDX59">finite</A> | 2215 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC12"><CODE>erfc</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC12">1.11 <CODE>erf</CODE>, <CODE>erff</CODE>, <CODE>erfc</CODE>, <CODE>erfcf</CODE>---error function</A></TD></TR> | 
| 2161 | <LI><A HREF="libm.html#IDX62">finitef</A> | 2216 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC12"><CODE>erfcf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC12">1.11 <CODE>erf</CODE>, <CODE>erff</CODE>, <CODE>erfc</CODE>, <CODE>erfcf</CODE>---error function</A></TD></TR> | 
| 2162 | <LI><A HREF="libm.html#IDX39">floor</A> | 2217 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC12"><CODE>erff</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC12">1.11 <CODE>erf</CODE>, <CODE>erff</CODE>, <CODE>erfc</CODE>, <CODE>erfcf</CODE>---error function</A></TD></TR> | 
| 2163 | <LI><A HREF="libm.html#IDX40">floorf</A> | 2218 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC13"><CODE>exp</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC13">1.12 <CODE>exp</CODE>, <CODE>expf</CODE>---exponential</A></TD></TR> | 
| 2164 | <LI><A HREF="libm.html#IDX43">fmod</A> | 2219 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC13"><CODE>expf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC13">1.12 <CODE>exp</CODE>, <CODE>expf</CODE>---exponential</A></TD></TR> | 
| 2165 | <LI><A HREF="libm.html#IDX44">fmodf</A> | 2220 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC33"><CODE>expm1</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC33">1.32 <CODE>expm1</CODE>, <CODE>expm1f</CODE>---exponential minus 1</A></TD></TR> | 
| 2166 | <LI><A HREF="libm.html#IDX45">frexp</A> | 2221 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC33"><CODE>expm1f</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC33">1.32 <CODE>expm1</CODE>, <CODE>expm1f</CODE>---exponential minus 1</A></TD></TR> | 
| 2167 | <LI><A HREF="libm.html#IDX46">frexpf</A> | 2222 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2168 | </DIR> | 2223 | <TR><TH><A NAME="cp_F"></A>F</TH><TD></TD><TD></TD></TR> | 
| 2169 | <H2><A NAME="cindex_g">g</A></H2> | 2224 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC14"><CODE>fabs</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC14">1.13 <CODE>fabs</CODE>, <CODE>fabsf</CODE>---absolute value (magnitude)</A></TD></TR> | 
| 2170 | <DIR> | 2225 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC14"><CODE>fabsf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC14">1.13 <CODE>fabs</CODE>, <CODE>fabsf</CODE>---absolute value (magnitude)</A></TD></TR> | 
| 2171 | <LI><A HREF="libm.html#IDX47">gamma</A> | 2226 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC20"><CODE>finite</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC20">1.19 <CODE>isnan</CODE>,<CODE>isnanf</CODE>,<CODE>isinf</CODE>,<CODE>isinff</CODE>,<CODE>finite</CODE>,<CODE>finitef</CODE>---test for exceptional numbers</A></TD></TR> | 
| 2172 | <LI><A HREF="libm.html#IDX51">gamma_r</A> | 2227 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC20"><CODE>finitef</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC20">1.19 <CODE>isnan</CODE>,<CODE>isnanf</CODE>,<CODE>isinf</CODE>,<CODE>isinff</CODE>,<CODE>finite</CODE>,<CODE>finitef</CODE>---test for exceptional numbers</A></TD></TR> | 
| 2173 | <LI><A HREF="libm.html#IDX48">gammaf</A> | 2228 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC15"><CODE>floor</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC15">1.14 <CODE>floor</CODE>, <CODE>floorf</CODE>, <CODE>ceil</CODE>, <CODE>ceilf</CODE>---floor and ceiling</A></TD></TR> | 
| 2174 | <LI><A HREF="libm.html#IDX52">gammaf_r</A> | 2229 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC15"><CODE>floorf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC15">1.14 <CODE>floor</CODE>, <CODE>floorf</CODE>, <CODE>ceil</CODE>, <CODE>ceilf</CODE>---floor and ceiling</A></TD></TR> | 
| 2175 | </DIR> | 2230 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC16"><CODE>fmod</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC16">1.15 <CODE>fmod</CODE>, <CODE>fmodf</CODE>---floating-point remainder (modulo)</A></TD></TR> | 
| 2176 | <H2><A NAME="cindex_h">h</A></H2> | 2231 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC16"><CODE>fmodf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC16">1.15 <CODE>fmod</CODE>, <CODE>fmodf</CODE>---floating-point remainder (modulo)</A></TD></TR> | 
| 2177 | <DIR> | 2232 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC17"><CODE>frexp</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC17">1.16 <CODE>frexp</CODE>, <CODE>frexpf</CODE>---split floating-point number</A></TD></TR> | 
| 2178 | <LI><A HREF="libm.html#IDX55">hypot</A> | 2233 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC17"><CODE>frexpf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC17">1.16 <CODE>frexp</CODE>, <CODE>frexpf</CODE>---split floating-point number</A></TD></TR> | 
| 2179 | <LI><A HREF="libm.html#IDX56">hypotf</A> | 2234 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2180 | </DIR> | 2235 | <TR><TH><A NAME="cp_G"></A>G</TH><TD></TD><TD></TD></TR> | 
| 2181 | <H2><A NAME="cindex_i">i</A></H2> | 2236 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC18"><CODE>gamma</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC18">1.17 <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>,</A></TD></TR> | 
| 2182 | <DIR> | 2237 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC18"><CODE>gamma_r</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC18">1.17 <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>,</A></TD></TR> | 
| 2183 | <LI><A HREF="libm.html#IDX91">ilogb</A> | 2238 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC18"><CODE>gammaf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC18">1.17 <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>,</A></TD></TR> | 
| 2184 | <LI><A HREF="libm.html#IDX92">ilogbf</A> | 2239 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC18"><CODE>gammaf_r</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC18">1.17 <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>,</A></TD></TR> | 
| 2185 | <LI><A HREF="libm.html#IDX93">infinity</A> | 2240 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2186 | <LI><A HREF="libm.html#IDX94">infinityf</A> | 2241 | <TR><TH><A NAME="cp_H"></A>H</TH><TD></TD><TD></TD></TR> | 
| 2187 | <LI><A HREF="libm.html#IDX58">isinf</A> | 2242 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC19"><CODE>hypot</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC19">1.18 <CODE>hypot</CODE>, <CODE>hypotf</CODE>---distance from origin</A></TD></TR> | 
| 2188 | <LI><A HREF="libm.html#IDX61">isinff</A> | 2243 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC19"><CODE>hypotf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC19">1.18 <CODE>hypot</CODE>, <CODE>hypotf</CODE>---distance from origin</A></TD></TR> | 
| 2189 | <LI><A HREF="libm.html#IDX57">isnan</A> | 2244 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2190 | <LI><A HREF="libm.html#IDX60">isnanf</A> | 2245 | <TR><TH><A NAME="cp_I"></A>I</TH><TD></TD><TD></TD></TR> | 
| 2191 | </DIR> | 2246 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC34"><CODE>ilogb</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC34">1.33 <CODE>ilogb</CODE>, <CODE>ilogbf</CODE>---get exponent of floating point number</A></TD></TR> | 
| 2192 | <H2><A NAME="cindex_j">j</A></H2> | 2247 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC34"><CODE>ilogbf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC34">1.33 <CODE>ilogb</CODE>, <CODE>ilogbf</CODE>---get exponent of floating point number</A></TD></TR> | 
| 2193 | <DIR> | 2248 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC35"><CODE>infinity</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC35">1.34 <CODE>infinity</CODE>, <CODE>infinityf</CODE>---representation of infinity</A></TD></TR> | 
| 2194 | <LI><A HREF="libm.html#IDX19">j0</A> | 2249 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC35"><CODE>infinityf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC35">1.34 <CODE>infinity</CODE>, <CODE>infinityf</CODE>---representation of infinity</A></TD></TR> | 
| 2195 | <LI><A HREF="libm.html#IDX20">j0f</A> | 2250 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC20"><CODE>isinf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC20">1.19 <CODE>isnan</CODE>,<CODE>isnanf</CODE>,<CODE>isinf</CODE>,<CODE>isinff</CODE>,<CODE>finite</CODE>,<CODE>finitef</CODE>---test for exceptional numbers</A></TD></TR> | 
| 2196 | <LI><A HREF="libm.html#IDX21">j1</A> | 2251 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC20"><CODE>isinff</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC20">1.19 <CODE>isnan</CODE>,<CODE>isnanf</CODE>,<CODE>isinf</CODE>,<CODE>isinff</CODE>,<CODE>finite</CODE>,<CODE>finitef</CODE>---test for exceptional numbers</A></TD></TR> | 
| 2197 | <LI><A HREF="libm.html#IDX22">j1f</A> | 2252 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC20"><CODE>isnan</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC20">1.19 <CODE>isnan</CODE>,<CODE>isnanf</CODE>,<CODE>isinf</CODE>,<CODE>isinff</CODE>,<CODE>finite</CODE>,<CODE>finitef</CODE>---test for exceptional numbers</A></TD></TR> | 
| 2198 | <LI><A HREF="libm.html#IDX23">jn</A> | 2253 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC20"><CODE>isnanf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC20">1.19 <CODE>isnan</CODE>,<CODE>isnanf</CODE>,<CODE>isinf</CODE>,<CODE>isinff</CODE>,<CODE>finite</CODE>,<CODE>finitef</CODE>---test for exceptional numbers</A></TD></TR> | 
| 2199 | <LI><A HREF="libm.html#IDX24">jnf</A> | 2254 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2200 | </DIR> | 2255 | <TR><TH><A NAME="cp_J"></A>J</TH><TD></TD><TD></TD></TR> | 
| 2201 | <H2><A NAME="cindex_l">l</A></H2> | 2256 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>j0</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2202 | <DIR> | 2257 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>j0f</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2203 | <LI><A HREF="libm.html#IDX63">ldexp</A> | 2258 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>j1</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2204 | <LI><A HREF="libm.html#IDX64">ldexpf</A> | 2259 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>j1f</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2205 | <LI><A HREF="libm.html#IDX49">lgamma</A> | 2260 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>jn</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2206 | <LI><A HREF="libm.html#IDX53">lgamma_r</A> | 2261 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>jnf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2207 | <LI><A HREF="libm.html#IDX50">lgammaf</A> | 2262 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2208 | <LI><A HREF="libm.html#IDX54">lgammaf_r</A> | 2263 | <TR><TH><A NAME="cp_L"></A>L</TH><TD></TD><TD></TD></TR> | 
| 2209 | <LI><A HREF="libm.html#IDX65">log</A> | 2264 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC21"><CODE>ldexp</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC21">1.20 <CODE>ldexp</CODE>, <CODE>ldexpf</CODE>---load exponent</A></TD></TR> | 
| 2210 | <LI><A HREF="libm.html#IDX67">log10</A> | 2265 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC21"><CODE>ldexpf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC21">1.20 <CODE>ldexp</CODE>, <CODE>ldexpf</CODE>---load exponent</A></TD></TR> | 
| 2211 | <LI><A HREF="libm.html#IDX68">log10f</A> | 2266 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC18"><CODE>lgamma</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC18">1.17 <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>,</A></TD></TR> | 
| 2212 | <LI><A HREF="libm.html#IDX95">log1p</A> | 2267 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC18"><CODE>lgamma_r</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC18">1.17 <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>,</A></TD></TR> | 
| 2213 | <LI><A HREF="libm.html#IDX96">log1pf</A> | 2268 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC18"><CODE>lgammaf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC18">1.17 <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>,</A></TD></TR> | 
| 2214 | <LI><A HREF="libm.html#IDX66">logf</A> | 2269 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC18"><CODE>lgammaf_r</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC18">1.17 <CODE>gamma</CODE>, <CODE>gammaf</CODE>, <CODE>lgamma</CODE>, <CODE>lgammaf</CODE>, <CODE>gamma_r</CODE>,</A></TD></TR> | 
| 2215 | </DIR> | 2270 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC22"><CODE>log</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC22">1.21 <CODE>log</CODE>, <CODE>logf</CODE>---natural logarithms</A></TD></TR> | 
| 2216 | <H2><A NAME="cindex_m">m</A></H2> | 2271 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC23"><CODE>log10</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC23">1.22 <CODE>log10</CODE>, <CODE>log10f</CODE>---base 10 logarithms</A></TD></TR> | 
| 2217 | <DIR> | 2272 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC23"><CODE>log10f</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC23">1.22 <CODE>log10</CODE>, <CODE>log10f</CODE>---base 10 logarithms</A></TD></TR> | 
| 2218 | <LI><A HREF="libm.html#IDX97">matherr</A> | 2273 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC36"><CODE>log1p</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC36">1.35 <CODE>log1p</CODE>, <CODE>log1pf</CODE>---log of <CODE>1 + <VAR>x</VAR></CODE></A></TD></TR> | 
| 2219 | <LI><A HREF="libm.html#IDX107"><CODE>matherr</CODE> and reentrancy</A> | 2274 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC36"><CODE>log1pf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC36">1.35 <CODE>log1p</CODE>, <CODE>log1pf</CODE>---log of <CODE>1 + <VAR>x</VAR></CODE></A></TD></TR> | 
| 2220 | <LI><A HREF="libm.html#IDX98">modf</A> | 2275 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC22"><CODE>logf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC22">1.21 <CODE>log</CODE>, <CODE>logf</CODE>---natural logarithms</A></TD></TR> | 
| 2221 | <LI><A HREF="libm.html#IDX99">modff</A> | 2276 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2222 | </DIR> | 2277 | <TR><TH><A NAME="cp_M"></A>M</TH><TD></TD><TD></TD></TR> | 
| 2223 | <H2><A NAME="cindex_n">n</A></H2> | 2278 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC37"><CODE>matherr</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC37">1.36 <CODE>matherr</CODE>---modifiable math error handler</A></TD></TR> | 
| 2224 | <DIR> | 2279 | <TR><TD></TD><TD valign=top><A HREF="libm.html#IDX6"><CODE>matherr</CODE> and reentrancy</A></TD><TD valign=top><A HREF="libm.html#SEC42">2. Reentrancy Properties of <CODE>libm</CODE></A></TD></TR> | 
| 2225 | <LI><A HREF="libm.html#IDX100">nan</A> | 2280 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC38"><CODE>modf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC38">1.37 <CODE>modf</CODE>, <CODE>modff</CODE>---split fractional and integer parts</A></TD></TR> | 
| 2226 | <LI><A HREF="libm.html#IDX101">nanf</A> | 2281 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC38"><CODE>modff</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC38">1.37 <CODE>modf</CODE>, <CODE>modff</CODE>---split fractional and integer parts</A></TD></TR> | 
| 2227 | <LI><A HREF="libm.html#IDX102">nextafter</A> | 2282 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2228 | <LI><A HREF="libm.html#IDX103">nextafterf</A> | 2283 | <TR><TH><A NAME="cp_N"></A>N</TH><TD></TD><TD></TD></TR> | 
| 2229 | </DIR> | 2284 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC39"><CODE>nan</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC39">1.38 <CODE>nan</CODE>, <CODE>nanf</CODE>---representation of infinity</A></TD></TR> | 
| 2230 | <H2><A NAME="cindex_o">o</A></H2> | 2285 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC39"><CODE>nanf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC39">1.38 <CODE>nan</CODE>, <CODE>nanf</CODE>---representation of infinity</A></TD></TR> | 
| 2231 | <DIR> | 2286 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC40"><CODE>nextafter</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC40">1.39 <CODE>nextafter</CODE>, <CODE>nextafterf</CODE>---get next number</A></TD></TR> | 
| 2232 | <LI><A HREF="libm.html#IDX4">OS stubs</A> | 2287 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC40"><CODE>nextafterf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC40">1.39 <CODE>nextafter</CODE>, <CODE>nextafterf</CODE>---get next number</A></TD></TR> | 
| 2233 | </DIR> | 2288 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2234 | <H2><A NAME="cindex_p">p</A></H2> | 2289 | <TR><TH><A NAME="cp_O"></A>O</TH><TD></TD><TD></TD></TR> | 
| 2235 | <DIR> | 2290 | <TR><TD></TD><TD valign=top><A HREF="libm.html#IDX4">OS stubs</A></TD><TD valign=top><A HREF="libm.html#SEC1">1. Mathematical Functions (<TT>`math.h'</TT>)</A></TD></TR> | 
| 2236 | <LI><A HREF="libm.html#IDX69">pow</A> | 2291 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2237 | <LI><A HREF="libm.html#IDX70">powf</A> | 2292 | <TR><TH><A NAME="cp_P"></A>P</TH><TD></TD><TD></TD></TR> | 
| 2238 | </DIR> | 2293 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC24"><CODE>pow</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC24">1.23 <CODE>pow</CODE>, <CODE>powf</CODE>---x to the power y</A></TD></TR> | 
| 2239 | <H2><A NAME="cindex_r">r</A></H2> | 2294 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC24"><CODE>powf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC24">1.23 <CODE>pow</CODE>, <CODE>powf</CODE>---x to the power y</A></TD></TR> | 
| 2240 | <DIR> | 2295 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2241 | <LI><A HREF="libm.html#IDX106">reentrancy</A> | 2296 | <TR><TH><A NAME="cp_R"></A>R</TH><TD></TD><TD></TD></TR> | 
| 2242 | <LI><A HREF="libm.html#IDX71">remainder</A> | 2297 | <TR><TD></TD><TD valign=top><A HREF="libm.html#IDX5">reentrancy</A></TD><TD valign=top><A HREF="libm.html#SEC42">2. Reentrancy Properties of <CODE>libm</CODE></A></TD></TR> | 
| 2243 | <LI><A HREF="libm.html#IDX72">remainderf</A> | 2298 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC25"><CODE>remainder</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC25">1.24 <CODE>remainder</CODE>, <CODE>remainderf</CODE>---round and remainder</A></TD></TR> | 
| 2244 | </DIR> | 2299 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC25"><CODE>remainderf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC25">1.24 <CODE>remainder</CODE>, <CODE>remainderf</CODE>---round and remainder</A></TD></TR> | 
| 2245 | <H2><A NAME="cindex_s">s</A></H2> | 2300 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2246 | <DIR> | 2301 | <TR><TH><A NAME="cp_S"></A>S</TH><TD></TD><TD></TD></TR> | 
| 2247 | <LI><A HREF="libm.html#IDX104">scalbn</A> | 2302 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC41"><CODE>scalbn</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC41">1.40 <CODE>scalbn</CODE>, <CODE>scalbnf</CODE>---scale by integer</A></TD></TR> | 
| 2248 | <LI><A HREF="libm.html#IDX105">scalbnf</A> | 2303 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC41"><CODE>scalbnf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC41">1.40 <CODE>scalbn</CODE>, <CODE>scalbnf</CODE>---scale by integer</A></TD></TR> | 
| 2249 | <LI><A HREF="libm.html#IDX75">sin</A> | 2304 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC27"><CODE>sin</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC27">1.26 <CODE>sin</CODE>, <CODE>sinf</CODE>, <CODE>cos</CODE>, <CODE>cosf</CODE>---sine or cosine</A></TD></TR> | 
| 2250 | <LI><A HREF="libm.html#IDX76">sinf</A> | 2305 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC27"><CODE>sinf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC27">1.26 <CODE>sin</CODE>, <CODE>sinf</CODE>, <CODE>cos</CODE>, <CODE>cosf</CODE>---sine or cosine</A></TD></TR> | 
| 2251 | <LI><A HREF="libm.html#IDX79">sinh</A> | 2306 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC28"><CODE>sinh</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC28">1.27 <CODE>sinh</CODE>, <CODE>sinhf</CODE>---hyperbolic sine</A></TD></TR> | 
| 2252 | <LI><A HREF="libm.html#IDX80">sinhf</A> | 2307 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC28"><CODE>sinhf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC28">1.27 <CODE>sinh</CODE>, <CODE>sinhf</CODE>---hyperbolic sine</A></TD></TR> | 
| 2253 | <LI><A HREF="libm.html#IDX73">sqrt</A> | 2308 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC26"><CODE>sqrt</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC26">1.25 <CODE>sqrt</CODE>, <CODE>sqrtf</CODE>---positive square root</A></TD></TR> | 
| 2254 | <LI><A HREF="libm.html#IDX74">sqrtf</A> | 2309 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC26"><CODE>sqrtf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC26">1.25 <CODE>sqrt</CODE>, <CODE>sqrtf</CODE>---positive square root</A></TD></TR> | 
| 2255 | <LI><A HREF="libm.html#IDX3">stubs</A> | 2310 | <TR><TD></TD><TD valign=top><A HREF="libm.html#IDX3">stubs</A></TD><TD valign=top><A HREF="libm.html#SEC1">1. Mathematical Functions (<TT>`math.h'</TT>)</A></TD></TR> | 
| 2256 | <LI><A HREF="libm.html#IDX2">support subroutines</A> | 2311 | <TR><TD></TD><TD valign=top><A HREF="libm.html#IDX2">support subroutines</A></TD><TD valign=top><A HREF="libm.html#SEC1">1. Mathematical Functions (<TT>`math.h'</TT>)</A></TD></TR> | 
| 2257 | <LI><A HREF="libm.html#IDX1">system calls</A> | 2312 | <TR><TD></TD><TD valign=top><A HREF="libm.html#IDX1">system calls</A></TD><TD valign=top><A HREF="libm.html#SEC1">1. Mathematical Functions (<TT>`math.h'</TT>)</A></TD></TR> | 
| 2258 | </DIR> | 2313 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2259 | <H2><A NAME="cindex_t">t</A></H2> | 2314 | <TR><TH><A NAME="cp_T"></A>T</TH><TD></TD><TD></TD></TR> | 
| 2260 | <DIR> | 2315 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC29"><CODE>tan</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC29">1.28 <CODE>tan</CODE>, <CODE>tanf</CODE>---tangent</A></TD></TR> | 
| 2261 | <LI><A HREF="libm.html#IDX81">tan</A> | 2316 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC29"><CODE>tanf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC29">1.28 <CODE>tan</CODE>, <CODE>tanf</CODE>---tangent</A></TD></TR> | 
| 2262 | <LI><A HREF="libm.html#IDX82">tanf</A> | 2317 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC30"><CODE>tanh</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC30">1.29 <CODE>tanh</CODE>, <CODE>tanhf</CODE>---hyperbolic tangent</A></TD></TR> | 
| 2263 | <LI><A HREF="libm.html#IDX83">tanh</A> | 2318 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC30"><CODE>tanhf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC30">1.29 <CODE>tanh</CODE>, <CODE>tanhf</CODE>---hyperbolic tangent</A></TD></TR> | 
| 2264 | <LI><A HREF="libm.html#IDX84">tanhf</A> | 2319 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2265 | </DIR> | 2320 | <TR><TH><A NAME="cp_Y"></A>Y</TH><TD></TD><TD></TD></TR> | 
| 2266 | <H2><A NAME="cindex_y">y</A></H2> | 2321 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>y0</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2267 | <DIR> | 2322 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>y0f</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2268 | <LI><A HREF="libm.html#IDX25">y0</A> | 2323 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>y1</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2269 | <LI><A HREF="libm.html#IDX26">y0f</A> | 2324 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>y1f</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2270 | <LI><A HREF="libm.html#IDX27">y1</A> | 2325 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>yn</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2271 | <LI><A HREF="libm.html#IDX28">y1f</A> | 2326 | <TR><TD></TD><TD valign=top><A HREF="libm.html#SEC10"><CODE>ynf</CODE></A></TD><TD valign=top><A HREF="libm.html#SEC10">1.9 <CODE>jN</CODE>,<CODE>jNf</CODE>,<CODE>yN</CODE>,<CODE>yNf</CODE>---Bessel functions</A></TD></TR> | 
| 2272 | <LI><A HREF="libm.html#IDX29">yn</A> | 2327 | <TR><TD COLSPAN=3> <HR></TD></TR> | 
| 2273 | <LI><A HREF="libm.html#IDX30">ynf</A> | 2328 | </TABLE><P></P><table><tr><th valign=top>Jump to:   </th><td><A HREF="libm.html#cp_A" style="text-decoration:none"><b>A</b></A> | 
| 2274 | </DIR> | 2329 |   | 
| 2275 | 2330 | <A HREF="libm.html#cp_C" style="text-decoration:none"><b>C</b></A> | |
| 2276 | 2331 |   | |
| 2277 | <P><HR><P> | 2332 | <A HREF="libm.html#cp_E" style="text-decoration:none"><b>E</b></A> | 
| 2278 | This document was generated on 21 July 2002 using | 2333 |   | 
| 2279 | <A HREF="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</A> 1.56k. | 2334 | <A HREF="libm.html#cp_F" style="text-decoration:none"><b>F</b></A> | 
| 2280 | </BODY> | 2335 |   | 
| 2281 | </HTML> | 2336 | <A HREF="libm.html#cp_G" style="text-decoration:none"><b>G</b></A> | 
| 2337 |   | ||
| 2338 | <A HREF="libm.html#cp_H" style="text-decoration:none"><b>H</b></A> | ||
| 2339 |   | ||
| 2340 | <A HREF="libm.html#cp_I" style="text-decoration:none"><b>I</b></A> | ||
| 2341 |   | ||
| 2342 | <A HREF="libm.html#cp_J" style="text-decoration:none"><b>J</b></A> | ||
| 2343 |   | ||
| 2344 | <A HREF="libm.html#cp_L" style="text-decoration:none"><b>L</b></A> | ||
| 2345 |   | ||
| 2346 | <A HREF="libm.html#cp_M" style="text-decoration:none"><b>M</b></A> | ||
| 2347 |   | ||
| 2348 | <A HREF="libm.html#cp_N" style="text-decoration:none"><b>N</b></A> | ||
| 2349 |   | ||
| 2350 | <A HREF="libm.html#cp_O" style="text-decoration:none"><b>O</b></A> | ||
| 2351 |   | ||
| 2352 | <A HREF="libm.html#cp_P" style="text-decoration:none"><b>P</b></A> | ||
| 2353 |   | ||
| 2354 | <A HREF="libm.html#cp_R" style="text-decoration:none"><b>R</b></A> | ||
| 2355 |   | ||
| 2356 | <A HREF="libm.html#cp_S" style="text-decoration:none"><b>S</b></A> | ||
| 2357 |   | ||
| 2358 | <A HREF="libm.html#cp_T" style="text-decoration:none"><b>T</b></A> | ||
| 2359 |   | ||
| 2360 | <A HREF="libm.html#cp_Y" style="text-decoration:none"><b>Y</b></A> | ||
| 2361 |   | ||
| 2362 | </td></tr></table><br><P> | ||
| 2363 | |||
| 2364 | <HR SIZE="6"> | ||
