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