math.h.html

来自「unix 下的C开发手册,还用详细的例程。」· HTML 代码 · 共 198 行

HTML
198
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>&lt;math.h&gt;</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_007_505">&nbsp;</a>NAME</h4><blockquote>math.h - mathematical declarations</blockquote><h4><a name = "tag_000_007_506">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>#include &lt;math.h&gt;</code></pre></blockquote><h4><a name = "tag_000_007_507">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>&lt;math.h&gt;</i>header providesfor the following constants.The values are of type<b>double</b>and are accurate within the precision of the<b>double</b>type.<dl compact><dt>M_E<dd>Value of <i>e</i><dt>M_LOG2E<dd>Value of log<small><sub>2</sub></small><i>e</i><dt>M_LOG10E<dd>Value of log<small><sub>10</sub></small><i>e</i><dt>M_LN2<dd>Value of log<small><sub>e</sub></small>2<dt>M_LN10<dd>Value of log<small><sub>e</sub></small>10<dt>M_PI<dd>Value of <sub><img src="../images/pi.gif"></sub><dt>M_PI_2<dd>Value of <sub><img src="../images/pi.gif"></sub>/2<dt>M_PI_4<dd>Value of <sub><img src="../images/pi.gif"></sub>/4<dt>M_1_PI<dd>Value of 1/<sub><img src="../images/pi.gif"></sub><dt>M_2_PI<dd>Value of 2/<sub><img src="../images/pi.gif"></sub><dt>M_2_SQRTPI<dd>Value of 2/ <sub><img src="../images/sqrt2.gif"><img src="../images/pi.gif"></sub><dt>M_SQRT2<dd>Value of <sub><img src="../images/sqrt2.gif"></sub>2<dt>M_SQRT1_2<dd>Value of 1/<sub><img src="../images/sqrt2.gif"></sub>2</dl><p>The header defines the following symbolic constants:<dl compact><dt>MAXFLOAT<dd>Value of maximum non-infinite single-precision floating point number.<dt>HUGE_VAL<dd>A positive<b>double</b>expression, not necessarily representable as a<b>float</b>.Used as an error value returned by the mathematics library.HUGE_VAL evaluates to positive infinity on systems supporting the ANSI/IEEE&nbsp;Std&nbsp;754:1985 standard.</dl><p>The following are declared as functions and may also be definedas macros.Function prototypes must be provided for use with an ISO Ccompiler.<pre><code>double <a href="acos.html">acos</a>(double);double <a href="asin.html">asin</a>(double);double <a href="atan.html">atan</a>(double);double <a href="atan2.html">atan2</a>(double, double);double <a href="ceil.html">ceil</a>(double);double <a href="cos.html">cos</a>(double);double <a href="cosh.html">cosh</a>(double);double <a href="exp.html">exp</a>(double);double <a href="fabs.html">fabs</a>(double);double <a href="floor.html">floor</a>(double);double <a href="fmod.html">fmod</a>(double, double);double <a href="frexp.html">frexp</a>(double, int *);double <a href="ldexp.html">ldexp</a>(double, int);double <a href="log.html">log</a>(double);double <a href="log10.html">log10</a>(double);double <a href="modf.html">modf</a>(double, double *);double <a href="pow.html">pow</a>(double, double);double <a href="sin.html">sin</a>(double);double <a href="sinh.html">sinh</a>(double);double <a href="sqrt.html">sqrt</a>(double);double <a href="tan.html">tan</a>(double);double <a href="tanh.html">tanh</a>(double);double <a href="erf.html">erf</a>(double);double <a href="erfc.html">erfc</a>(double);double <a href="gamma.html">gamma</a>(double);double <a href="hypot.html">hypot</a>(double, double);double <a href="j0.html">j0</a>(double);double <a href="j1.html">j1</a>(double);double <a href="jn.html">jn</a>(int, double);double <a href="lgamma.html">lgamma</a>(double);double <a href="y0.html">y0</a>(double);double <a href="y1.html">y1</a>(double);double <a href="yn.html">yn</a>(int, double);int    <a href="isnan.html">isnan</a>(double);double <a href="acosh.html">acosh</a>(double);double <a href="asinh.html">asinh</a>(double);double <a href="atanh.html">atanh</a>(double);double <a href="cbrt.html">cbrt</a>(double);double <a href="expm1.html">expm1</a>(double);int    <a href="ilogb.html">ilogb</a>(double);double <a href="log1p.html">log1p</a>(double);double <a href="logb.html">logb</a>(double);double <a href="nextafter.html">nextafter</a>(double, double);double <a href="remainder.html">remainder</a>(double, double);double <a href="rint.html">rint</a>(double);double <a href="scalb.html">scalb</a>(double, double);</code></pre><p>The following external variable is defined:<pre><code>extern int signgam;</code></pre></blockquote><h4><a name = "tag_000_007_508">&nbsp;</a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_509">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_510">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="acos.html">acos()</a></i>,<i><a href="acosh.html">acosh()</a></i>,<i><a href="asin.html">asin()</a></i>,<i><a href="atan.html">atan()</a></i>,<i><a href="atan2.html">atan2()</a></i>,<i><a href="cbrt.html">cbrt()</a></i>,<i><a href="ceil.html">ceil()</a></i>,<i><a href="cos.html">cos()</a></i>,<i><a href="cosh.html">cosh()</a></i>,<i><a href="erf.html">erf()</a></i>,<i><a href="exp.html">exp()</a></i>,<i><a href="expm1.html">expm1()</a></i>,<i><a href="fabs.html">fabs()</a></i>,<i><a href="floor.html">floor()</a></i>,<i><a href="fmod.html">fmod()</a></i>,<i><a href="frexp.html">frexp()</a></i>,<i><a href="hypot.html">hypot()</a></i>,<i><a href="ilogb.html">ilogb()</a></i>,<i><a href="isnan.html">isnan()</a></i>,<i><a href="j0.html">j0()</a></i>,<i><a href="ldexp.html">ldexp()</a></i>,<i><a href="lgamma.html">lgamma()</a></i>,<i><a href="log.html">log()</a></i>,<i><a href="log10.html">log10()</a></i>,<i><a href="log1p.html">log1p()</a></i>,<i><a href="logb.html">logb()</a></i>,<i><a href="modf.html">modf()</a></i>,<i><a href="nextafter.html">nextafter()</a></i>,<i><a href="pow.html">pow()</a></i>,<i><a href="remainder.html">remainder()</a></i>,<i><a href="rint.html">rint()</a></i>,<i><a href="scalb.html">scalb()</a></i>,<i><a href="sin.html">sin()</a></i>,<i><a href="sinh.html">sinh()</a></i>,<i><a href="sqrt.html">sqrt()</a></i>,<i><a href="tan.html">tan()</a></i>,<i><a href="tanh.html">tanh()</a></i>,<i><a href="y0.html">y0()</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?