mirror of
https://github.com/esp8266/Arduino.git
synced 2025-10-22 19:53:04 +03:00
Adding CodeSourcery just in case of, to be removed later
This commit is contained in:
@@ -0,0 +1,261 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Library Index - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Long-Double-Functions.html#Long-Double-Functions" title="Long Double Functions">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="Library-Index"></a>
|
||||
<p>
|
||||
Previous: <a rel="previous" accesskey="p" href="Long-Double-Functions.html#Long-Double-Functions">Long Double Functions</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="unnumbered">Library Index</h2>
|
||||
|
||||
<ul class="index-cp" compact>
|
||||
<li><a href="acos.html#index-acos-5"><code>acos</code></a>: <a href="acos.html#acos">acos</a></li>
|
||||
<li><a href="acos.html#index-acosf-6"><code>acosf</code></a>: <a href="acos.html#acos">acos</a></li>
|
||||
<li><a href="acosh.html#index-acosh-7"><code>acosh</code></a>: <a href="acosh.html#acosh">acosh</a></li>
|
||||
<li><a href="acosh.html#index-acoshf-8"><code>acoshf</code></a>: <a href="acosh.html#acosh">acosh</a></li>
|
||||
<li><a href="asin.html#index-asin-9"><code>asin</code></a>: <a href="asin.html#asin">asin</a></li>
|
||||
<li><a href="asin.html#index-asinf-10"><code>asinf</code></a>: <a href="asin.html#asin">asin</a></li>
|
||||
<li><a href="asinh.html#index-asinh-11"><code>asinh</code></a>: <a href="asinh.html#asinh">asinh</a></li>
|
||||
<li><a href="asinh.html#index-asinhf-12"><code>asinhf</code></a>: <a href="asinh.html#asinh">asinh</a></li>
|
||||
<li><a href="atan.html#index-atan-13"><code>atan</code></a>: <a href="atan.html#atan">atan</a></li>
|
||||
<li><a href="atan2.html#index-atan2-15"><code>atan2</code></a>: <a href="atan2.html#atan2">atan2</a></li>
|
||||
<li><a href="atan2.html#index-atan2f-16"><code>atan2f</code></a>: <a href="atan2.html#atan2">atan2</a></li>
|
||||
<li><a href="atan.html#index-atanf-14"><code>atanf</code></a>: <a href="atan.html#atan">atan</a></li>
|
||||
<li><a href="atanh.html#index-atanh-17"><code>atanh</code></a>: <a href="atanh.html#atanh">atanh</a></li>
|
||||
<li><a href="atanh.html#index-atanhf-18"><code>atanhf</code></a>: <a href="atanh.html#atanh">atanh</a></li>
|
||||
<li><a href="cbrt.html#index-cbrt-31"><code>cbrt</code></a>: <a href="cbrt.html#cbrt">cbrt</a></li>
|
||||
<li><a href="cbrt.html#index-cbrtf-32"><code>cbrtf</code></a>: <a href="cbrt.html#cbrt">cbrt</a></li>
|
||||
<li><a href="floor.html#index-ceil-51"><code>ceil</code></a>: <a href="floor.html#floor">floor</a></li>
|
||||
<li><a href="floor.html#index-ceilf-52"><code>ceilf</code></a>: <a href="floor.html#floor">floor</a></li>
|
||||
<li><a href="copysign.html#index-copysign-33"><code>copysign</code></a>: <a href="copysign.html#copysign">copysign</a></li>
|
||||
<li><a href="copysign.html#index-copysignf-34"><code>copysignf</code></a>: <a href="copysign.html#copysign">copysign</a></li>
|
||||
<li><a href="sin.html#index-cos-142"><code>cos</code></a>: <a href="sin.html#sin">sin</a></li>
|
||||
<li><a href="sin.html#index-cosf-143"><code>cosf</code></a>: <a href="sin.html#sin">sin</a></li>
|
||||
<li><a href="erf.html#index-erf-35"><code>erf</code></a>: <a href="erf.html#erf">erf</a></li>
|
||||
<li><a href="erf.html#index-erfc-37"><code>erfc</code></a>: <a href="erf.html#erf">erf</a></li>
|
||||
<li><a href="erf.html#index-erfcf-38"><code>erfcf</code></a>: <a href="erf.html#erf">erf</a></li>
|
||||
<li><a href="erf.html#index-erff-36"><code>erff</code></a>: <a href="erf.html#erf">erf</a></li>
|
||||
<li><a href="exp.html#index-exp-39"><code>exp</code></a>: <a href="exp.html#exp">exp</a></li>
|
||||
<li><a href="exp2.html#index-exp2-41"><code>exp2</code></a>: <a href="exp2.html#exp2">exp2</a></li>
|
||||
<li><a href="exp2.html#index-exp2f-42"><code>exp2f</code></a>: <a href="exp2.html#exp2">exp2</a></li>
|
||||
<li><a href="exp.html#index-expf-40"><code>expf</code></a>: <a href="exp.html#exp">exp</a></li>
|
||||
<li><a href="expm1.html#index-expm1-43"><code>expm1</code></a>: <a href="expm1.html#expm1">expm1</a></li>
|
||||
<li><a href="expm1.html#index-expm1f-44"><code>expm1f</code></a>: <a href="expm1.html#expm1">expm1</a></li>
|
||||
<li><a href="fabs.html#index-fabs-45"><code>fabs</code></a>: <a href="fabs.html#fabs">fabs</a></li>
|
||||
<li><a href="fabs.html#index-fabsf-46"><code>fabsf</code></a>: <a href="fabs.html#fabs">fabs</a></li>
|
||||
<li><a href="fdim.html#index-fdim-47"><code>fdim</code></a>: <a href="fdim.html#fdim">fdim</a></li>
|
||||
<li><a href="fdim.html#index-fdimf-48"><code>fdimf</code></a>: <a href="fdim.html#fdim">fdim</a></li>
|
||||
<li><a href="fpclassify.html#index-finite-92"><code>finite</code></a>: <a href="fpclassify.html#fpclassify">fpclassify</a></li>
|
||||
<li><a href="fpclassify.html#index-finitef-95"><code>finitef</code></a>: <a href="fpclassify.html#fpclassify">fpclassify</a></li>
|
||||
<li><a href="floor.html#index-floor-49"><code>floor</code></a>: <a href="floor.html#floor">floor</a></li>
|
||||
<li><a href="floor.html#index-floorf-50"><code>floorf</code></a>: <a href="floor.html#floor">floor</a></li>
|
||||
<li><a href="fma.html#index-fma-53"><code>fma</code></a>: <a href="fma.html#fma">fma</a></li>
|
||||
<li><a href="fma.html#index-fmaf-54"><code>fmaf</code></a>: <a href="fma.html#fma">fma</a></li>
|
||||
<li><a href="fmax.html#index-fmax-55"><code>fmax</code></a>: <a href="fmax.html#fmax">fmax</a></li>
|
||||
<li><a href="fmax.html#index-fmaxf-56"><code>fmaxf</code></a>: <a href="fmax.html#fmax">fmax</a></li>
|
||||
<li><a href="fmin.html#index-fmin-57"><code>fmin</code></a>: <a href="fmin.html#fmin">fmin</a></li>
|
||||
<li><a href="fmin.html#index-fminf-58"><code>fminf</code></a>: <a href="fmin.html#fmin">fmin</a></li>
|
||||
<li><a href="fmod.html#index-fmod-59"><code>fmod</code></a>: <a href="fmod.html#fmod">fmod</a></li>
|
||||
<li><a href="fmod.html#index-fmodf-60"><code>fmodf</code></a>: <a href="fmod.html#fmod">fmod</a></li>
|
||||
<li><a href="fpclassify.html#index-fpclassify-85"><code>fpclassify</code></a>: <a href="fpclassify.html#fpclassify">fpclassify</a></li>
|
||||
<li><a href="frexp.html#index-frexp-61"><code>frexp</code></a>: <a href="frexp.html#frexp">frexp</a></li>
|
||||
<li><a href="frexp.html#index-frexpf-62"><code>frexpf</code></a>: <a href="frexp.html#frexp">frexp</a></li>
|
||||
<li><a href="gamma.html#index-gamma-63"><code>gamma</code></a>: <a href="gamma.html#gamma">gamma</a></li>
|
||||
<li><a href="gamma.html#index-gamma_005fr-67"><code>gamma_r</code></a>: <a href="gamma.html#gamma">gamma</a></li>
|
||||
<li><a href="gamma.html#index-gammaf-64"><code>gammaf</code></a>: <a href="gamma.html#gamma">gamma</a></li>
|
||||
<li><a href="gamma.html#index-gammaf_005fr-68"><code>gammaf_r</code></a>: <a href="gamma.html#gamma">gamma</a></li>
|
||||
<li><a href="hypot.html#index-hypot-73"><code>hypot</code></a>: <a href="hypot.html#hypot">hypot</a></li>
|
||||
<li><a href="hypot.html#index-hypotf-74"><code>hypotf</code></a>: <a href="hypot.html#hypot">hypot</a></li>
|
||||
<li><a href="ilogb.html#index-ilogb-75"><code>ilogb</code></a>: <a href="ilogb.html#ilogb">ilogb</a></li>
|
||||
<li><a href="ilogb.html#index-ilogbf-76"><code>ilogbf</code></a>: <a href="ilogb.html#ilogb">ilogb</a></li>
|
||||
<li><a href="infinity.html#index-infinity-77"><code>infinity</code></a>: <a href="infinity.html#infinity">infinity</a></li>
|
||||
<li><a href="infinity.html#index-infinityf-78"><code>infinityf</code></a>: <a href="infinity.html#infinity">infinity</a></li>
|
||||
<li><a href="fpclassify.html#index-isfinite-86"><code>isfinite</code></a>: <a href="fpclassify.html#fpclassify">fpclassify</a></li>
|
||||
<li><a href="isgreater.html#index-isgreater-79"><code>isgreater</code></a>: <a href="isgreater.html#isgreater">isgreater</a></li>
|
||||
<li><a href="isgreater.html#index-isgreaterequal-80"><code>isgreaterequal</code></a>: <a href="isgreater.html#isgreater">isgreater</a></li>
|
||||
<li><a href="fpclassify.html#index-isinf-87"><code>isinf</code></a>: <a href="fpclassify.html#fpclassify">fpclassify</a></li>
|
||||
<li><a href="fpclassify.html#index-isinff-94"><code>isinff</code></a>: <a href="fpclassify.html#fpclassify">fpclassify</a></li>
|
||||
<li><a href="isgreater.html#index-isless-81"><code>isless</code></a>: <a href="isgreater.html#isgreater">isgreater</a></li>
|
||||
<li><a href="isgreater.html#index-islessequal-82"><code>islessequal</code></a>: <a href="isgreater.html#isgreater">isgreater</a></li>
|
||||
<li><a href="isgreater.html#index-islessgreater-83"><code>islessgreater</code></a>: <a href="isgreater.html#isgreater">isgreater</a></li>
|
||||
<li><a href="fpclassify.html#index-isnan-88"><code>isnan</code></a>: <a href="fpclassify.html#fpclassify">fpclassify</a></li>
|
||||
<li><a href="fpclassify.html#index-isnanf-93"><code>isnanf</code></a>: <a href="fpclassify.html#fpclassify">fpclassify</a></li>
|
||||
<li><a href="fpclassify.html#index-isnormal-89"><code>isnormal</code></a>: <a href="fpclassify.html#fpclassify">fpclassify</a></li>
|
||||
<li><a href="isgreater.html#index-isunordered-84"><code>isunordered</code></a>: <a href="isgreater.html#isgreater">isgreater</a></li>
|
||||
<li><a href="jN.html#index-j0-19"><code>j0</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="jN.html#index-j0f-20"><code>j0f</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="jN.html#index-j1-21"><code>j1</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="jN.html#index-j1f-22"><code>j1f</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="jN.html#index-jn-23"><code>jn</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="jN.html#index-jnf-24"><code>jnf</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="ldexp.html#index-ldexp-96"><code>ldexp</code></a>: <a href="ldexp.html#ldexp">ldexp</a></li>
|
||||
<li><a href="ldexp.html#index-ldexpf-97"><code>ldexpf</code></a>: <a href="ldexp.html#ldexp">ldexp</a></li>
|
||||
<li><a href="gamma.html#index-lgamma-65"><code>lgamma</code></a>: <a href="gamma.html#gamma">gamma</a></li>
|
||||
<li><a href="gamma.html#index-lgamma_005fr-69"><code>lgamma_r</code></a>: <a href="gamma.html#gamma">gamma</a></li>
|
||||
<li><a href="gamma.html#index-lgammaf-66"><code>lgammaf</code></a>: <a href="gamma.html#gamma">gamma</a></li>
|
||||
<li><a href="gamma.html#index-lgammaf_005fr-70"><code>lgammaf_r</code></a>: <a href="gamma.html#gamma">gamma</a></li>
|
||||
<li><a href="lrint.html#index-llrint-110"><code>llrint</code></a>: <a href="lrint.html#lrint">lrint</a></li>
|
||||
<li><a href="lrint.html#index-llrintf-111"><code>llrintf</code></a>: <a href="lrint.html#lrint">lrint</a></li>
|
||||
<li><a href="lround.html#index-llround-114"><code>llround</code></a>: <a href="lround.html#lround">lround</a></li>
|
||||
<li><a href="lround.html#index-llroundf-115"><code>llroundf</code></a>: <a href="lround.html#lround">lround</a></li>
|
||||
<li><a href="log.html#index-log-98"><code>log</code></a>: <a href="log.html#log">log</a></li>
|
||||
<li><a href="log10.html#index-log10-100"><code>log10</code></a>: <a href="log10.html#log10">log10</a></li>
|
||||
<li><a href="log10.html#index-log10f-101"><code>log10f</code></a>: <a href="log10.html#log10">log10</a></li>
|
||||
<li><a href="log1p.html#index-log1p-102"><code>log1p</code></a>: <a href="log1p.html#log1p">log1p</a></li>
|
||||
<li><a href="log1p.html#index-log1pf-103"><code>log1pf</code></a>: <a href="log1p.html#log1p">log1p</a></li>
|
||||
<li><a href="log2.html#index-log2-104"><code>log2</code></a>: <a href="log2.html#log2">log2</a></li>
|
||||
<li><a href="log2.html#index-log2f-105"><code>log2f</code></a>: <a href="log2.html#log2">log2</a></li>
|
||||
<li><a href="logb.html#index-logb-106"><code>logb</code></a>: <a href="logb.html#logb">logb</a></li>
|
||||
<li><a href="logb.html#index-logbf-107"><code>logbf</code></a>: <a href="logb.html#logb">logb</a></li>
|
||||
<li><a href="log.html#index-logf-99"><code>logf</code></a>: <a href="log.html#log">log</a></li>
|
||||
<li><a href="lrint.html#index-lrint-108"><code>lrint</code></a>: <a href="lrint.html#lrint">lrint</a></li>
|
||||
<li><a href="lrint.html#index-lrintf-109"><code>lrintf</code></a>: <a href="lrint.html#lrint">lrint</a></li>
|
||||
<li><a href="lround.html#index-lround-112"><code>lround</code></a>: <a href="lround.html#lround">lround</a></li>
|
||||
<li><a href="lround.html#index-lroundf-113"><code>lroundf</code></a>: <a href="lround.html#lround">lround</a></li>
|
||||
<li><a href="matherr.html#index-matherr-116"><code>matherr</code></a>: <a href="matherr.html#matherr">matherr</a></li>
|
||||
<li><a href="Reentrancy.html#index-g_t_0040code_007bmatherr_007d-and-reentrancy-155"><code>matherr</code> and reentrancy</a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="modf.html#index-modf-117"><code>modf</code></a>: <a href="modf.html#modf">modf</a></li>
|
||||
<li><a href="modf.html#index-modff-118"><code>modff</code></a>: <a href="modf.html#modf">modf</a></li>
|
||||
<li><a href="nan.html#index-nan-119"><code>nan</code></a>: <a href="nan.html#nan">nan</a></li>
|
||||
<li><a href="nan.html#index-nanf-120"><code>nanf</code></a>: <a href="nan.html#nan">nan</a></li>
|
||||
<li><a href="nearbyint.html#index-nearbyint-121"><code>nearbyint</code></a>: <a href="nearbyint.html#nearbyint">nearbyint</a></li>
|
||||
<li><a href="nearbyint.html#index-nearbyintf-122"><code>nearbyintf</code></a>: <a href="nearbyint.html#nearbyint">nearbyint</a></li>
|
||||
<li><a href="nextafter.html#index-nextafter-123"><code>nextafter</code></a>: <a href="nextafter.html#nextafter">nextafter</a></li>
|
||||
<li><a href="nextafter.html#index-nextafterf-124"><code>nextafterf</code></a>: <a href="nextafter.html#nextafter">nextafter</a></li>
|
||||
<li><a href="Math.html#index-OS-stubs-4">OS stubs</a>: <a href="Math.html#Math">Math</a></li>
|
||||
<li><a href="pow.html#index-pow-125"><code>pow</code></a>: <a href="pow.html#pow">pow</a></li>
|
||||
<li><a href="pow.html#index-powf-126"><code>powf</code></a>: <a href="pow.html#pow">pow</a></li>
|
||||
<li><a href="Reentrancy.html#index-reentrancy-154">reentrancy</a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="remainder.html#index-remainder-127"><code>remainder</code></a>: <a href="remainder.html#remainder">remainder</a></li>
|
||||
<li><a href="remainder.html#index-remainderf-128"><code>remainderf</code></a>: <a href="remainder.html#remainder">remainder</a></li>
|
||||
<li><a href="remquo.html#index-remquo-129"><code>remquo</code></a>: <a href="remquo.html#remquo">remquo</a></li>
|
||||
<li><a href="remquo.html#index-remquof-130"><code>remquof</code></a>: <a href="remquo.html#remquo">remquo</a></li>
|
||||
<li><a href="rint.html#index-rint-131"><code>rint</code></a>: <a href="rint.html#rint">rint</a></li>
|
||||
<li><a href="rint.html#index-rintf-132"><code>rintf</code></a>: <a href="rint.html#rint">rint</a></li>
|
||||
<li><a href="round.html#index-round-133"><code>round</code></a>: <a href="round.html#round">round</a></li>
|
||||
<li><a href="round.html#index-roundf-134"><code>roundf</code></a>: <a href="round.html#round">round</a></li>
|
||||
<li><a href="scalbn.html#index-scalbln-137"><code>scalbln</code></a>: <a href="scalbn.html#scalbn">scalbn</a></li>
|
||||
<li><a href="scalbn.html#index-scalblnf-138"><code>scalblnf</code></a>: <a href="scalbn.html#scalbn">scalbn</a></li>
|
||||
<li><a href="scalbn.html#index-scalbn-135"><code>scalbn</code></a>: <a href="scalbn.html#scalbn">scalbn</a></li>
|
||||
<li><a href="scalbn.html#index-scalbnf-136"><code>scalbnf</code></a>: <a href="scalbn.html#scalbn">scalbn</a></li>
|
||||
<li><a href="signbit.html#index-signbit-139"><code>signbit</code></a>: <a href="signbit.html#signbit">signbit</a></li>
|
||||
<li><a href="sin.html#index-sin-140"><code>sin</code></a>: <a href="sin.html#sin">sin</a></li>
|
||||
<li><a href="sin.html#index-sinf-141"><code>sinf</code></a>: <a href="sin.html#sin">sin</a></li>
|
||||
<li><a href="sinh.html#index-sinh-144"><code>sinh</code></a>: <a href="sinh.html#sinh">sinh</a></li>
|
||||
<li><a href="sinh.html#index-sinhf-145"><code>sinhf</code></a>: <a href="sinh.html#sinh">sinh</a></li>
|
||||
<li><a href="sqrt.html#index-sqrt-146"><code>sqrt</code></a>: <a href="sqrt.html#sqrt">sqrt</a></li>
|
||||
<li><a href="sqrt.html#index-sqrtf-147"><code>sqrtf</code></a>: <a href="sqrt.html#sqrt">sqrt</a></li>
|
||||
<li><a href="Math.html#index-stubs-3">stubs</a>: <a href="Math.html#Math">Math</a></li>
|
||||
<li><a href="Math.html#index-support-subroutines-2">support subroutines</a>: <a href="Math.html#Math">Math</a></li>
|
||||
<li><a href="Math.html#index-system-calls-1">system calls</a>: <a href="Math.html#Math">Math</a></li>
|
||||
<li><a href="tan.html#index-tan-148"><code>tan</code></a>: <a href="tan.html#tan">tan</a></li>
|
||||
<li><a href="tan.html#index-tanf-149"><code>tanf</code></a>: <a href="tan.html#tan">tan</a></li>
|
||||
<li><a href="tanh.html#index-tanh-150"><code>tanh</code></a>: <a href="tanh.html#tanh">tanh</a></li>
|
||||
<li><a href="tanh.html#index-tanhf-151"><code>tanhf</code></a>: <a href="tanh.html#tanh">tanh</a></li>
|
||||
<li><a href="gamma.html#index-tgamma-71"><code>tgamma</code></a>: <a href="gamma.html#gamma">gamma</a></li>
|
||||
<li><a href="gamma.html#index-tgammaf-72"><code>tgammaf</code></a>: <a href="gamma.html#gamma">gamma</a></li>
|
||||
<li><a href="trunc.html#index-trunc-152"><code>trunc</code></a>: <a href="trunc.html#trunc">trunc</a></li>
|
||||
<li><a href="trunc.html#index-truncf-153"><code>truncf</code></a>: <a href="trunc.html#trunc">trunc</a></li>
|
||||
<li><a href="jN.html#index-y0-25"><code>y0</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="jN.html#index-y0f-26"><code>y0f</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="jN.html#index-y1-27"><code>y1</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="jN.html#index-y1f-28"><code>y1f</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="jN.html#index-yn-29"><code>yn</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
<li><a href="jN.html#index-ynf-30"><code>ynf</code></a>: <a href="jN.html#jN">jN</a></li>
|
||||
</ul>
|
||||
<div class="contents">
|
||||
<h2>Table of Contents</h2>
|
||||
<ul>
|
||||
<li><a name="toc_Top" href="index.html#Top">Top</a>
|
||||
<li><a name="toc_Math" href="Math.html#Math">1 Mathematical Functions (<samp><span class="file">math.h</span></samp>)</a>
|
||||
<ul>
|
||||
<li><a href="version.html#version">1.1 Error Handling</a>
|
||||
<li><a href="version.html#version">1.2 Standards Compliance And Portability</a>
|
||||
<li><a href="acos.html#acos">1.3 <code>acos</code>, <code>acosf</code>—arc cosine</a>
|
||||
<li><a href="acosh.html#acosh">1.4 <code>acosh</code>, <code>acoshf</code>—inverse hyperbolic cosine</a>
|
||||
<li><a href="asin.html#asin">1.5 <code>asin</code>, <code>asinf</code>—arc sine</a>
|
||||
<li><a href="asinh.html#asinh">1.6 <code>asinh</code>, <code>asinhf</code>—inverse hyperbolic sine</a>
|
||||
<li><a href="atan.html#atan">1.7 <code>atan</code>, <code>atanf</code>—arc tangent</a>
|
||||
<li><a href="atan2.html#atan2">1.8 <code>atan2</code>, <code>atan2f</code>—arc tangent of y/x</a>
|
||||
<li><a href="atanh.html#atanh">1.9 <code>atanh</code>, <code>atanhf</code>—inverse hyperbolic tangent</a>
|
||||
<li><a href="jN.html#jN">1.10 <code>jN</code>, <code>jNf</code>, <code>yN</code>, <code>yNf</code>—Bessel functions</a>
|
||||
<li><a href="cbrt.html#cbrt">1.11 <code>cbrt</code>, <code>cbrtf</code>—cube root</a>
|
||||
<li><a href="copysign.html#copysign">1.12 <code>copysign</code>, <code>copysignf</code>—sign of <var>y</var>, magnitude of <var>x</var></a>
|
||||
<li><a href="cosh.html#cosh">1.13 <code>cosh</code>, <code>coshf</code>—hyperbolic cosine</a>
|
||||
<li><a href="erf.html#erf">1.14 <code>erf</code>, <code>erff</code>, <code>erfc</code>, <code>erfcf</code>—error function</a>
|
||||
<li><a href="exp.html#exp">1.15 <code>exp</code>, <code>expf</code>—exponential</a>
|
||||
<li><a href="exp2.html#exp2">1.16 <code>exp2</code>, <code>exp2f</code>–exponential, base 2</a>
|
||||
<li><a href="expm1.html#expm1">1.17 <code>expm1</code>, <code>expm1f</code>—exponential minus 1</a>
|
||||
<li><a href="fabs.html#fabs">1.18 <code>fabs</code>, <code>fabsf</code>—absolute value (magnitude)</a>
|
||||
<li><a href="fdim.html#fdim">1.19 <code>fdim</code>, <code>fdimf</code>–positive difference</a>
|
||||
<li><a href="floor.html#floor">1.20 <code>floor</code>, <code>floorf</code>, <code>ceil</code>, <code>ceilf</code>—floor and ceiling</a>
|
||||
<li><a href="fma.html#fma">1.21 <code>fma</code>, <code>fmaf</code>–floating multiply add</a>
|
||||
<li><a href="fmax.html#fmax">1.22 <code>fmax</code>, <code>fmaxf</code>–maximum</a>
|
||||
<li><a href="fmin.html#fmin">1.23 <code>fmin</code>, <code>fminf</code>–minimum</a>
|
||||
<li><a href="fmod.html#fmod">1.24 <code>fmod</code>, <code>fmodf</code>—floating-point remainder (modulo)</a>
|
||||
<li><a href="frexp.html#frexp">1.25 <code>frexp</code>, <code>frexpf</code>—split floating-point number</a>
|
||||
<li><a href="gamma.html#gamma">1.26 <code>gamma</code>, <code>gammaf</code>, <code>lgamma</code>, <code>lgammaf</code>, <code>gamma_r</code>, <code>gammaf_r</code>, <code>lgamma_r</code>, <code>lgammaf_r</code>, <code>tgamma</code>, and <code>tgammaf</code>–logarithmic and plain gamma functions</a>
|
||||
<li><a href="hypot.html#hypot">1.27 <code>hypot</code>, <code>hypotf</code>—distance from origin</a>
|
||||
<li><a href="ilogb.html#ilogb">1.28 <code>ilogb</code>, <code>ilogbf</code>—get exponent of floating-point number</a>
|
||||
<li><a href="infinity.html#infinity">1.29 <code>infinity</code>, <code>infinityf</code>–representation of infinity</a>
|
||||
<li><a href="isgreater.html#isgreater">1.30 <code>isgreater</code>, <code>isgreaterequal</code>, <code>isless</code>, <code>islessequal</code>, <code>islessgreater</code>, and <code>isunordered</code>–comparison macros</a>
|
||||
<li><a href="fpclassify.html#fpclassify">1.31 <code>fpclassify</code>, <code>isfinite</code>, <code>isinf</code>, <code>isnan</code>, and <code>isnormal</code>–floating-point classification macros; <code>finite</code>, <code>finitef</code>, <code>isinf</code>, <code>isinff</code>, <code>isnan</code>, <code>isnanf</code>–test for exceptional numbers</a>
|
||||
<li><a href="ldexp.html#ldexp">1.32 <code>ldexp</code>, <code>ldexpf</code>—load exponent</a>
|
||||
<li><a href="log.html#log">1.33 <code>log</code>, <code>logf</code>—natural logarithms</a>
|
||||
<li><a href="log10.html#log10">1.34 <code>log10</code>, <code>log10f</code>—base 10 logarithms</a>
|
||||
<li><a href="log1p.html#log1p">1.35 <code>log1p</code>, <code>log1pf</code>—log of <code>1 + </code><var>x</var></a>
|
||||
<li><a href="log2.html#log2">1.36 <code>log2</code>, <code>log2f</code>–base 2 logarithm</a>
|
||||
<li><a href="logb.html#logb">1.37 <code>logb</code>, <code>logbf</code>–get exponent of floating-point number</a>
|
||||
<li><a href="lrint.html#lrint">1.38 <code>lrint</code>, <code>lrintf</code>, <code>llrint</code>, <code>llrintf</code>–round to integer</a>
|
||||
<li><a href="lround.html#lround">1.39 <code>lround</code>, <code>lroundf</code>, <code>llround</code>, <code>llroundf</code>–round to integer, to nearest</a>
|
||||
<li><a href="matherr.html#matherr">1.40 <code>matherr</code>—modifiable math error handler</a>
|
||||
<li><a href="modf.html#modf">1.41 <code>modf</code>, <code>modff</code>—split fractional and integer parts</a>
|
||||
<li><a href="nan.html#nan">1.42 <code>nan</code>, <code>nanf</code>—representation of “Not a Number”</a>
|
||||
<li><a href="nearbyint.html#nearbyint">1.43 <code>nearbyint</code>, <code>nearbyintf</code>–round to integer</a>
|
||||
<li><a href="nextafter.html#nextafter">1.44 <code>nextafter</code>, <code>nextafterf</code>—get next number</a>
|
||||
<li><a href="pow.html#pow">1.45 <code>pow</code>, <code>powf</code>—x to the power y</a>
|
||||
<li><a href="remainder.html#remainder">1.46 <code>remainder</code>, <code>remainderf</code>—round and remainder</a>
|
||||
<li><a href="remquo.html#remquo">1.47 <code>remquo</code>, <code>remquof</code>–remainder and part of quotient</a>
|
||||
<li><a href="rint.html#rint">1.48 <code>rint</code>, <code>rintf</code>–round to integer</a>
|
||||
<li><a href="round.html#round">1.49 <code>round</code>, <code>roundf</code>–round to integer, to nearest</a>
|
||||
<li><a href="scalbn.html#scalbn">1.50 <code>scalbn</code>, <code>scalbnf</code>, <code>scalbln</code>, <code>scalblnf</code>–scale by power of FLT_RADIX (=2)</a>
|
||||
<li><a href="signbit.html#signbit">1.51 <code>signbit</code>–Does floating-point number have negative sign?</a>
|
||||
<li><a href="sin.html#sin">1.52 <code>sin</code>, <code>sinf</code>, <code>cos</code>, <code>cosf</code>—sine or cosine</a>
|
||||
<li><a href="sinh.html#sinh">1.53 <code>sinh</code>, <code>sinhf</code>—hyperbolic sine</a>
|
||||
<li><a href="sqrt.html#sqrt">1.54 <code>sqrt</code>, <code>sqrtf</code>—positive square root</a>
|
||||
<li><a href="tan.html#tan">1.55 <code>tan</code>, <code>tanf</code>—tangent</a>
|
||||
<li><a href="tanh.html#tanh">1.56 <code>tanh</code>, <code>tanhf</code>—hyperbolic tangent</a>
|
||||
<li><a href="trunc.html#trunc">1.57 <code>trunc</code>, <code>truncf</code>–round to integer, towards zero</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Reentrancy" href="Reentrancy.html#Reentrancy">2 Reentrancy Properties of <code>libm</code></a>
|
||||
<li><a name="toc_Long-Double-Functions" href="Long-Double-Functions.html#Long-Double-Functions">3 The long double function support of <code>libm</code></a>
|
||||
<li><a name="toc_Library-Index" href="Library-Index.html#Library-Index">Library Index</a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Long Double Functions - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Reentrancy.html#Reentrancy" title="Reentrancy">
|
||||
<link rel="next" href="Library-Index.html#Library-Index" title="Library Index">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="Long-Double-Functions"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="Library-Index.html#Library-Index">Library Index</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Reentrancy.html#Reentrancy">Reentrancy</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">3 The long double function support of <code>libm</code></h2>
|
||||
|
||||
<p>Currently, the full set of long double math functions is only provided
|
||||
on platforms where long double equals double.
|
||||
For such platforms, the long double math functions are implemented as calls to the double versions.
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Math - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="index.html#Top" title="Top">
|
||||
<link rel="next" href="Reentrancy.html#Reentrancy" title="Reentrancy">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="Math"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="Reentrancy.html#Reentrancy">Reentrancy</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="index.html#Top">Top</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">1 Mathematical Functions (<samp><span class="file">math.h</span></samp>)</h2>
|
||||
|
||||
<p>This chapter groups a wide variety of mathematical functions. The
|
||||
corresponding definitions and declarations are in <samp><span class="file">math.h</span></samp>.
|
||||
Two definitions from <samp><span class="file">math.h</span></samp> are of particular interest.
|
||||
|
||||
<ol type=1 start=1>
|
||||
<li>The representation of infinity as a <code>double</code> is defined as
|
||||
<code>HUGE_VAL</code>; this number is returned on overflow by many functions.
|
||||
The macro <code>HUGE_VALF</code> is a corresponding value for <code>float</code>.
|
||||
|
||||
<li>The structure <code>exception</code> is used when you write customized error
|
||||
handlers for the mathematical functions. You can customize error
|
||||
handling for most of these functions by defining your own version of
|
||||
<code>matherr</code>; see the section on <code>matherr</code> for details.
|
||||
</ol>
|
||||
|
||||
<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
|
||||
subroutines require stubs or minimal implementations for the same list
|
||||
of OS subroutines as <code>fputs</code>: <code>close</code>, <code>fstat</code>,
|
||||
<code>isatty</code>, <code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
See <a href="../libc/syscalls.html#syscalls">System Calls</a>,
|
||||
for a discussion and for sample minimal implementations of these support
|
||||
subroutines.
|
||||
|
||||
<p>Alternative declarations of the mathematical functions, which exploit
|
||||
specific machine capabilities to operate faster—but generally have
|
||||
less error checking and may reflect additional limitations on some
|
||||
machines—are available when you include <samp><span class="file">fastmath.h</span></samp> instead of
|
||||
<samp><span class="file">math.h</span></samp>.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="version.html#version">version</a>: Version of library
|
||||
<li><a accesskey="2" href="acos.html#acos">acos</a>: Arccosine
|
||||
<li><a accesskey="3" href="acosh.html#acosh">acosh</a>: Inverse hyperbolic cosine
|
||||
<li><a accesskey="4" href="asin.html#asin">asin</a>: Arcsine
|
||||
<li><a accesskey="5" href="asinh.html#asinh">asinh</a>: Inverse hyperbolic sine
|
||||
<li><a accesskey="6" href="atan.html#atan">atan</a>: Arctangent
|
||||
<li><a accesskey="7" href="atan2.html#atan2">atan2</a>: Arctangent of y/x
|
||||
<li><a accesskey="8" href="atanh.html#atanh">atanh</a>: Inverse hyperbolic tangent
|
||||
<li><a accesskey="9" href="jN.html#jN">jN</a>: Bessel functions (jN, yN)
|
||||
<li><a href="cbrt.html#cbrt">cbrt</a>: Cube root
|
||||
<li><a href="copysign.html#copysign">copysign</a>: Sign of Y, magnitude of X
|
||||
<li><a href="cosh.html#cosh">cosh</a>: Hyperbolic cosine
|
||||
<li><a href="erf.html#erf">erf</a>: Error function (erf, erfc)
|
||||
<li><a href="exp.html#exp">exp</a>: Exponential, base e
|
||||
<li><a href="exp2.html#exp2">exp2</a>: Exponential, base 2
|
||||
<li><a href="expm1.html#expm1">expm1</a>: Exponential, base e, of x - 1
|
||||
<li><a href="fabs.html#fabs">fabs</a>: Absolute value (magnitude)
|
||||
<li><a href="fdim.html#fdim">fdim</a>: Positive difference
|
||||
<li><a href="floor.html#floor">floor</a>: Floor and ceiling (floor, ceil)
|
||||
<li><a href="fma.html#fma">fma</a>: Floating multiply add
|
||||
<li><a href="fmax.html#fmax">fmax</a>: Maximum
|
||||
<li><a href="fmin.html#fmin">fmin</a>: Minimum
|
||||
<li><a href="fmod.html#fmod">fmod</a>: Floating-point remainder (modulo)
|
||||
<li><a href="fpclassify.html#fpclassify">fpclassify</a>: Floating-point classification macro
|
||||
<li><a href="frexp.html#frexp">frexp</a>: Split floating-point number
|
||||
<li><a href="gamma.html#gamma">gamma</a>: Logarithmic gamma function
|
||||
<li><a href="hypot.html#hypot">hypot</a>: Distance from origin
|
||||
<li><a href="ilogb.html#ilogb">ilogb</a>: Get exponent
|
||||
<li><a href="infinity.html#infinity">infinity</a>: Floating infinity
|
||||
<li><a href="isgreater.html#isgreater">isgreater</a>: Comparison macros
|
||||
<li><a href="ldexp.html#ldexp">ldexp</a>: Scale by a power of 2
|
||||
<li><a href="log.html#log">log</a>: Natural logarithms
|
||||
<li><a href="log10.html#log10">log10</a>: Base 10 logarithms
|
||||
<li><a href="log1p.html#log1p">log1p</a>: Log of 1 + X
|
||||
<li><a href="log2.html#log2">log2</a>: Base 2 logarithms
|
||||
<li><a href="logb.html#logb">logb</a>: Get exponent
|
||||
<li><a href="lrint.html#lrint">lrint</a>: Round to integer
|
||||
<li><a href="lround.html#lround">lround</a>: Round to integer, away from zero (lround, llround)
|
||||
<li><a href="matherr.html#matherr">matherr</a>: Modifiable math error handler
|
||||
<li><a href="modf.html#modf">modf</a>: Split fractional and integer parts
|
||||
<li><a href="nan.html#nan">nan</a>: Floating Not a Number
|
||||
<li><a href="nearbyint.html#nearbyint">nearbyint</a>: Round to integer
|
||||
<li><a href="nextafter.html#nextafter">nextafter</a>: Get next representable number
|
||||
<li><a href="pow.html#pow">pow</a>: X to the power Y
|
||||
<li><a href="remainder.html#remainder">remainder</a>: remainder of X divided by Y
|
||||
<li><a href="remquo.html#remquo">remquo</a>: Remainder and part of quotient
|
||||
<li><a href="rint.html#rint">rint</a>: Round to integer
|
||||
<li><a href="round.html#round">round</a>: Round to integer, away from zero
|
||||
<li><a href="scalbn.html#scalbn">scalbn</a>: Scale by a power of FLT_RADIX (2)
|
||||
<li><a href="signbit.html#signbit">signbit</a>: Does floating-point number have negative sign?
|
||||
<li><a href="sin.html#sin">sin</a>: Sine or cosine (sin, cos)
|
||||
<li><a href="sinh.html#sinh">sinh</a>: Hyperbolic sine
|
||||
<li><a href="sqrt.html#sqrt">sqrt</a>: Positive square root
|
||||
<li><a href="tan.html#tan">tan</a>: Tangent
|
||||
<li><a href="tanh.html#tanh">tanh</a>: Hyperbolic tangent
|
||||
<li><a href="trunc.html#trunc">trunc</a>: Round to integer, towards zero
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Reentrancy - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Math.html#Math" title="Math">
|
||||
<link rel="next" href="Long-Double-Functions.html#Long-Double-Functions" title="Long Double Functions">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="Reentrancy"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="Long-Double-Functions.html#Long-Double-Functions">Long Double Functions</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Math.html#Math">Math</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">2 Reentrancy Properties of <code>libm</code></h2>
|
||||
|
||||
<p><a name="index-reentrancy-154"></a><a name="index-g_t_0040code_007bmatherr_007d-and-reentrancy-155"></a>When a libm function detects an exceptional case, <code>errno</code> may be
|
||||
set, the <code>matherr</code> function may be called, and a error message
|
||||
may be written to the standard error stream. This behavior may not
|
||||
be reentrant.
|
||||
|
||||
<!-- The exact behavior depends on the currently selected error handling -->
|
||||
<!-- mode (IEEE, POSIX, X/Open, or SVID). -->
|
||||
<p>With reentrant C libraries like the Red Hat newlib C library, <code>errno</code> is
|
||||
a macro which expands to the per-thread error value. This makes it thread
|
||||
safe.
|
||||
|
||||
<p>When the user provides his own <code>matherr</code> function it must be
|
||||
reentrant for the math library as a whole to be reentrant.
|
||||
|
||||
<p>In normal debugged programs, there are usually no math subroutine
|
||||
errors—and therefore no assignments to <code>errno</code> and no <code>matherr</code>
|
||||
calls; in that situation, the math functions behave reentrantly.
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>acos - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="version.html#version" title="version">
|
||||
<link rel="next" href="acosh.html#acosh" title="acosh">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="acos"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="acosh.html#acosh">acosh</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="version.html#version">version</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.3 <code>acos</code>, <code>acosf</code>—arc cosine</h3>
|
||||
|
||||
<p><a name="index-acos-5"></a><a name="index-acosf-6"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double acos(double <var>x</var>);
|
||||
float acosf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
|
||||
<p><code>acos</code> computes the inverse cosine (arc cosine) of the input value.
|
||||
Arguments to <code>acos</code> must be in the range −1 to 1.
|
||||
|
||||
<p><code>acosf</code> is identical to <code>acos</code>, except that it performs
|
||||
its calculations on <code>floats</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>acos</code> and <code>acosf</code> return values in radians, in the range of 0 to pi.
|
||||
|
||||
<p>If <var>x</var> is not between −1 and 1, the returned value is NaN
|
||||
(not a number) the global variable <code>errno</code> is set to <code>EDOM</code>, and a
|
||||
<code>DOMAIN error</code> message is sent as standard error output.
|
||||
|
||||
<p>You can modify error handling for these functions using <code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>acosh - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="acos.html#acos" title="acos">
|
||||
<link rel="next" href="asin.html#asin" title="asin">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="acosh"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="asin.html#asin">asin</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="acos.html#acos">acos</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.4 <code>acosh</code>, <code>acoshf</code>—inverse hyperbolic cosine</h3>
|
||||
|
||||
<p><a name="index-acosh-7"></a><a name="index-acoshf-8"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double acosh(double <var>x</var>);
|
||||
float acoshf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>acosh</code> calculates the inverse hyperbolic cosine of <var>x</var>.
|
||||
<code>acosh</code> is defined as
|
||||
<pre class="smallexample"> log(<var>x</var> + sqrt(<var>x</var>*<var>x</var>-1))
|
||||
</pre>
|
||||
<p><var>x</var> must be a number greater than or equal to 1.
|
||||
|
||||
<p><code>acoshf</code> is identical, other than taking and returning floats.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>acosh</code> and <code>acoshf</code> return the calculated value. If <var>x</var>
|
||||
less than 1, the return value is NaN and <code>errno</code> is set to <code>EDOM</code>.
|
||||
|
||||
<p>You can change the error-handling behavior with the non-ANSI
|
||||
<code>matherr</code> function.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
Neither <code>acosh</code> nor <code>acoshf</code> are ANSI C. They are not recommended
|
||||
for portable programs.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>asin - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="acosh.html#acosh" title="acosh">
|
||||
<link rel="next" href="asinh.html#asinh" title="asinh">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="asin"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="asinh.html#asinh">asinh</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="acosh.html#acosh">acosh</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.5 <code>asin</code>, <code>asinf</code>—arc sine</h3>
|
||||
|
||||
<p><a name="index-asin-9"></a><a name="index-asinf-10"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double asin(double <var>x</var>);
|
||||
float asinf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
|
||||
<p><code>asin</code> computes the inverse sine (arc sine) of the argument <var>x</var>.
|
||||
Arguments to <code>asin</code> must be in the range −1 to 1.
|
||||
|
||||
<p><code>asinf</code> is identical to <code>asin</code>, other than taking and
|
||||
returning floats.
|
||||
|
||||
<p>You can modify error handling for these routines using <code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>asin</code> returns values in radians, in the range of -pi/2 to pi/2.
|
||||
|
||||
<p>If <var>x</var> is not in the range −1 to 1, <code>asin</code> and <code>asinf</code>
|
||||
return NaN (not a number), set the global variable <code>errno</code> to
|
||||
<code>EDOM</code>, and issue a <code>DOMAIN error</code> message.
|
||||
|
||||
<p>You can change this error treatment using <code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>asinh - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="asin.html#asin" title="asin">
|
||||
<link rel="next" href="atan.html#atan" title="atan">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="asinh"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="atan.html#atan">atan</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="asin.html#asin">asin</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.6 <code>asinh</code>, <code>asinhf</code>—inverse hyperbolic sine</h3>
|
||||
|
||||
<p><a name="index-asinh-11"></a><a name="index-asinhf-12"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double asinh(double <var>x</var>);
|
||||
float asinhf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>asinh</code> calculates the inverse hyperbolic sine of <var>x</var>.
|
||||
<code>asinh</code> is defined as
|
||||
<pre class="smallexample"> sgn(<var>x</var>) * log(abs(<var>x</var>) + sqrt(1+<var>x</var>*<var>x</var>))
|
||||
</pre>
|
||||
<p><code>asinhf</code> is identical, other than taking and returning floats.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>asinh</code> and <code>asinhf</code> return the calculated value.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
Neither <code>asinh</code> nor <code>asinhf</code> are ANSI C.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>atan - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="asinh.html#asinh" title="asinh">
|
||||
<link rel="next" href="atan2.html#atan2" title="atan2">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="atan"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="atan2.html#atan2">atan2</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="asinh.html#asinh">asinh</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.7 <code>atan</code>, <code>atanf</code>—arc tangent</h3>
|
||||
|
||||
<p><a name="index-atan-13"></a><a name="index-atanf-14"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double atan(double <var>x</var>);
|
||||
float atanf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
|
||||
<p><code>atan</code> computes the inverse tangent (arc tangent) of the input value.
|
||||
|
||||
<p><code>atanf</code> is identical to <code>atan</code>, save that it operates on <code>floats</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>atan</code> returns a value in radians, in the range of -pi/2 to pi/2.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>atan</code> is ANSI C. <code>atanf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>atan2 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="atan.html#atan" title="atan">
|
||||
<link rel="next" href="atanh.html#atanh" title="atanh">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="atan2"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="atanh.html#atanh">atanh</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="atan.html#atan">atan</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.8 <code>atan2</code>, <code>atan2f</code>—arc tangent of y/x</h3>
|
||||
|
||||
<p><a name="index-atan2-15"></a><a name="index-atan2f-16"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double atan2(double <var>y</var>,double <var>x</var>);
|
||||
float atan2f(float <var>y</var>,float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
|
||||
<p><code>atan2</code> computes the inverse tangent (arc tangent) of <var>y</var>/<var>x</var>.
|
||||
<code>atan2</code> produces the correct result even for angles near
|
||||
pi/2 or -pi/2
|
||||
(that is, when <var>x</var> is near 0).
|
||||
|
||||
<p><code>atan2f</code> is identical to <code>atan2</code>, save that it takes and returns
|
||||
<code>float</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>atan2</code> and <code>atan2f</code> return a value in radians, in the range of
|
||||
-pi to pi.
|
||||
|
||||
<p>You can modify error handling for these functions using <code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>atan2</code> is ANSI C. <code>atan2f</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>atanh - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="atan2.html#atan2" title="atan2">
|
||||
<link rel="next" href="jN.html#jN" title="jN">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="atanh"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="jN.html#jN">jN</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="atan2.html#atan2">atan2</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.9 <code>atanh</code>, <code>atanhf</code>—inverse hyperbolic tangent</h3>
|
||||
|
||||
<p><a name="index-atanh-17"></a><a name="index-atanhf-18"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double atanh(double <var>x</var>);
|
||||
float atanhf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>atanh</code> calculates the inverse hyperbolic tangent of <var>x</var>.
|
||||
|
||||
<p><code>atanhf</code> is identical, other than taking and returning
|
||||
<code>float</code> values.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>atanh</code> and <code>atanhf</code> return the calculated value.
|
||||
|
||||
<p>If
|
||||
<pre class="smallexample"> <var>x</var>|
|
||||
</pre>
|
||||
<p>is greater than 1, the global <code>errno</code> is set to <code>EDOM</code> and
|
||||
the result is a NaN. A <code>DOMAIN error</code> is reported.
|
||||
|
||||
<p>If
|
||||
<pre class="smallexample"> <var>x</var>|
|
||||
</pre>
|
||||
<p>is 1, the global <code>errno</code> is set to <code>EDOM</code>; and the result is
|
||||
infinity with the same sign as <code>x</code>. A <code>SING error</code> is reported.
|
||||
|
||||
<p>You can modify the error handling for these routines using
|
||||
<code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
Neither <code>atanh</code> nor <code>atanhf</code> are ANSI C.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>cbrt - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="jN.html#jN" title="jN">
|
||||
<link rel="next" href="copysign.html#copysign" title="copysign">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="cbrt"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="copysign.html#copysign">copysign</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="jN.html#jN">jN</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.11 <code>cbrt</code>, <code>cbrtf</code>—cube root</h3>
|
||||
|
||||
<p><a name="index-cbrt-31"></a><a name="index-cbrtf-32"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double cbrt(double <var>x</var>);
|
||||
float cbrtf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>cbrt</code> computes the cube root of the argument.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The cube root is returned.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>cbrt</code> is in System V release 4. <code>cbrtf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>copysign - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="cbrt.html#cbrt" title="cbrt">
|
||||
<link rel="next" href="cosh.html#cosh" title="cosh">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="copysign"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="cosh.html#cosh">cosh</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="cbrt.html#cbrt">cbrt</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.12 <code>copysign</code>, <code>copysignf</code>—sign of <var>y</var>, magnitude of <var>x</var></h3>
|
||||
|
||||
<p><a name="index-copysign-33"></a><a name="index-copysignf-34"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double copysign (double <var>x</var>, double <var>y</var>);
|
||||
float copysignf (float <var>x</var>, float <var>y</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>copysign</code> constructs a number with the magnitude (absolute value)
|
||||
of its first argument, <var>x</var>, and the sign of its second argument,
|
||||
<var>y</var>.
|
||||
|
||||
<p><code>copysignf</code> does the same thing; the two functions differ only in
|
||||
the type of their arguments and result.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>copysign</code> returns a <code>double</code> with the magnitude of
|
||||
<var>x</var> and the sign of <var>y</var>.
|
||||
<code>copysignf</code> returns a <code>float</code> with the magnitude of
|
||||
<var>x</var> and the sign of <var>y</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>copysign</code> is not required by either ANSI C or the System V Interface
|
||||
Definition (Issue 2).
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>cosh - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="copysign.html#copysign" title="copysign">
|
||||
<link rel="next" href="erf.html#erf" title="erf">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="cosh"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="erf.html#erf">erf</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="copysign.html#copysign">copysign</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.13 <code>cosh</code>, <code>coshf</code>—hyperbolic cosine</h3>
|
||||
|
||||
<p><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double cosh(double <var>x</var>);
|
||||
float coshf(float <var>x</var>)
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
|
||||
<p><code>cosh</code> computes the hyperbolic cosine of the argument <var>x</var>.
|
||||
<code>cosh(</code><var>x</var><code>)</code> is defined as
|
||||
<pre class="smallexample"> (exp(x) + exp(-x))/2
|
||||
</pre>
|
||||
<p>Angles are specified in radians.
|
||||
<code>coshf</code> is identical, save that it takes and returns <code>float</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The computed value is returned. When the correct value would create
|
||||
an overflow, <code>cosh</code> returns the value <code>HUGE_VAL</code> with the
|
||||
appropriate sign, and the global value <code>errno</code> is set to <code>ERANGE</code>.
|
||||
|
||||
<p>You can modify error handling for these functions using the
|
||||
function <code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>cosh</code> is ANSI.
|
||||
<code>coshf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>erf - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="cosh.html#cosh" title="cosh">
|
||||
<link rel="next" href="exp.html#exp" title="exp">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="erf"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="exp.html#exp">exp</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="cosh.html#cosh">cosh</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.14 <code>erf</code>, <code>erff</code>, <code>erfc</code>, <code>erfcf</code>—error function</h3>
|
||||
|
||||
<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>
|
||||
<pre class="example"> #include <math.h>
|
||||
double erf(double <var>x</var>);
|
||||
float erff(float <var>x</var>);
|
||||
double erfc(double <var>x</var>);
|
||||
float erfcf(float <var>x</var>);
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>erf</code> calculates an approximation to the “error function”,
|
||||
which estimates the probability that an observation will fall within
|
||||
<var>x</var> standard deviations of the mean (assuming a normal
|
||||
distribution).
|
||||
|
||||
<p><code>erfc</code> calculates the complementary probability; that is,
|
||||
<code>erfc(</code><var>x</var><code>)</code> is <code>1 - erf(</code><var>x</var><code>)</code>. <code>erfc</code> is computed directly,
|
||||
so that you can use it to avoid the loss of precision that would
|
||||
result from subtracting large probabilities (on large <var>x</var>) from 1.
|
||||
|
||||
<p><code>erff</code> and <code>erfcf</code> differ from <code>erf</code> and <code>erfc</code> only in the
|
||||
argument and result types.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
For positive arguments, <code>erf</code> and all its variants return a
|
||||
probability—a number between 0 and 1.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
None of the variants of <code>erf</code> are ANSI C.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>exp - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="erf.html#erf" title="erf">
|
||||
<link rel="next" href="exp2.html#exp2" title="exp2">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="exp"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="exp2.html#exp2">exp2</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="erf.html#erf">erf</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.15 <code>exp</code>, <code>expf</code>—exponential</h3>
|
||||
|
||||
<p><a name="index-exp-39"></a><a name="index-expf-40"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double exp(double <var>x</var>);
|
||||
float expf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>exp</code> and <code>expf</code> calculate the exponential of <var>x</var>, that is,
|
||||
e raised to the power <var>x</var> (where e
|
||||
is the base of the natural system of logarithms, approximately 2.71828).
|
||||
|
||||
<p>You can use the (non-ANSI) function <code>matherr</code> to specify
|
||||
error handling for these functions.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
On success, <code>exp</code> and <code>expf</code> return the calculated value.
|
||||
If the result underflows, the returned value is <code>0</code>. If the
|
||||
result overflows, the returned value is <code>HUGE_VAL</code>. In
|
||||
either case, <code>errno</code> is set to <code>ERANGE</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>exp</code> is ANSI C. <code>expf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>exp2 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="exp.html#exp" title="exp">
|
||||
<link rel="next" href="expm1.html#expm1" title="expm1">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="exp2"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="expm1.html#expm1">expm1</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="exp.html#exp">exp</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.16 <code>exp2</code>, <code>exp2f</code>–exponential, base 2</h3>
|
||||
|
||||
<p><a name="index-exp2-41"></a><a name="index-exp2f-42"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double exp2(double <var>x</var>);
|
||||
float exp2f(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>exp2</code> and <code>exp2f</code> calculate 2 ^ <var>x</var>, that is,
|
||||
2 raised to the power <var>x</var>.
|
||||
|
||||
<p>You can use the (non-ANSI) function <code>matherr</code> to specify
|
||||
error handling for these functions.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
On success, <code>exp2</code> and <code>exp2f</code> return the calculated value.
|
||||
If the result underflows, the returned value is <code>0</code>. If the
|
||||
result overflows, the returned value is <code>HUGE_VAL</code>. In
|
||||
either case, <code>errno</code> is set to <code>ERANGE</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>expm1 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="exp2.html#exp2" title="exp2">
|
||||
<link rel="next" href="fabs.html#fabs" title="fabs">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="expm1"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="fabs.html#fabs">fabs</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="exp2.html#exp2">exp2</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.17 <code>expm1</code>, <code>expm1f</code>—exponential minus 1</h3>
|
||||
|
||||
<p><a name="index-expm1-43"></a><a name="index-expm1f-44"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double expm1(double <var>x</var>);
|
||||
float expm1f(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>expm1</code> and <code>expm1f</code> calculate the exponential of <var>x</var>
|
||||
and subtract 1, that is,
|
||||
e raised to the power <var>x</var> minus 1 (where e
|
||||
is the base of the natural system of logarithms, approximately
|
||||
2.71828). The result is accurate even for small values of
|
||||
<var>x</var>, where using <code>exp(</code><var>x</var><code>)-1</code> would lose many
|
||||
significant digits.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
e raised to the power <var>x</var>, minus 1.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
Neither <code>expm1</code> nor <code>expm1f</code> is required by ANSI C or by
|
||||
the System V Interface Definition (Issue 2).
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>fabs - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="expm1.html#expm1" title="expm1">
|
||||
<link rel="next" href="fdim.html#fdim" title="fdim">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="fabs"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="fdim.html#fdim">fdim</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="expm1.html#expm1">expm1</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.18 <code>fabs</code>, <code>fabsf</code>—absolute value (magnitude)</h3>
|
||||
|
||||
<p><a name="index-fabs-45"></a><a name="index-fabsf-46"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double fabs(double <var>x</var>);
|
||||
float fabsf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fabs</code> and <code>fabsf</code> calculate
|
||||
the absolute value (magnitude) of the argument <var>x</var>, by direct
|
||||
manipulation of the bit representation of <var>x</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The calculated value is returned. No errors are detected.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>fabs</code> is ANSI.
|
||||
<code>fabsf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>fdim - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="fabs.html#fabs" title="fabs">
|
||||
<link rel="next" href="floor.html#floor" title="floor">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="fdim"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="floor.html#floor">floor</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fabs.html#fabs">fabs</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.19 <code>fdim</code>, <code>fdimf</code>–positive difference</h3>
|
||||
|
||||
<p><a name="index-fdim-47"></a><a name="index-fdimf-48"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double fdim(double <var>x</var>, double <var>y</var>);
|
||||
float fdimf(float <var>x</var>, float <var>y</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>fdim</code> functions determine the positive difference between their
|
||||
arguments, returning:
|
||||
<pre class="smallexample"> <var>x</var> - <var>y</var> if <var>x</var> > <var>y</var>, or
|
||||
</pre>
|
||||
<pre class="smallexample"> +0 if <var>x</var> <= <var>y</var>, or
|
||||
</pre>
|
||||
<pre class="smallexample"> NAN if either argument is NAN.
|
||||
</pre>
|
||||
<p>A range error may occur.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The <code>fdim</code> functions return the positive difference value.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>floor - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="fdim.html#fdim" title="fdim">
|
||||
<link rel="next" href="fma.html#fma" title="fma">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="floor"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="fma.html#fma">fma</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fdim.html#fdim">fdim</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.20 <code>floor</code>, <code>floorf</code>, <code>ceil</code>, <code>ceilf</code>—floor and ceiling</h3>
|
||||
|
||||
<p><a name="index-floor-49"></a><a name="index-floorf-50"></a><a name="index-ceil-51"></a><a name="index-ceilf-52"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double floor(double <var>x</var>);
|
||||
float floorf(float <var>x</var>);
|
||||
double ceil(double <var>x</var>);
|
||||
float ceilf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>floor</code> and <code>floorf</code> find
|
||||
the nearest integer less than or equal to <var>x</var>.
|
||||
<code>ceil</code> and <code>ceilf</code> find
|
||||
the nearest integer greater than or equal to <var>x</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>floor</code> and <code>ceil</code> return the integer result as a double.
|
||||
<code>floorf</code> and <code>ceilf</code> return the integer result as a float.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>floor</code> and <code>ceil</code> are ANSI.
|
||||
<code>floorf</code> and <code>ceilf</code> are extensions.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>fma - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="floor.html#floor" title="floor">
|
||||
<link rel="next" href="fmax.html#fmax" title="fmax">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="fma"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="fmax.html#fmax">fmax</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="floor.html#floor">floor</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.21 <code>fma</code>, <code>fmaf</code>–floating multiply add</h3>
|
||||
|
||||
<p><a name="index-fma-53"></a><a name="index-fmaf-54"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double fma(double <var>x</var>, double <var>y</var>, double <var>z</var>);
|
||||
float fmaf(float <var>x</var>, float <var>y</var>, float <var>z</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>fma</code> functions compute (<var>x</var> * <var>y</var>) + <var>z</var>, rounded as one ternary
|
||||
operation: they compute the value (as if) to infinite precision and round once
|
||||
to the result format, according to the rounding mode characterized by the value
|
||||
of FLT_ROUNDS. That is, they are supposed to do this: see below.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The <code>fma</code> functions return (<var>x</var> * <var>y</var>) + <var>z</var>, rounded as one ternary
|
||||
operation.
|
||||
|
||||
<p><br>
|
||||
<strong>Bugs</strong><br>
|
||||
This implementation does not provide the function that it should, purely
|
||||
returning "(<var>x</var> * <var>y</var>) + <var>z</var>;" with no attempt at all to provide the
|
||||
simulated infinite precision intermediates which are required. DO NOT USE THEM.
|
||||
|
||||
<p>If double has enough more precision than float, then <code>fmaf</code> should provide
|
||||
the expected numeric results, as it does use double for the calculation. But
|
||||
since this is not the case for all platforms, this manual cannot determine
|
||||
if it is so for your case.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>fmax - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="fma.html#fma" title="fma">
|
||||
<link rel="next" href="fmin.html#fmin" title="fmin">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="fmax"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="fmin.html#fmin">fmin</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fma.html#fma">fma</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.22 <code>fmax</code>, <code>fmaxf</code>–maximum</h3>
|
||||
|
||||
<p><a name="index-fmax-55"></a><a name="index-fmaxf-56"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double fmax(double <var>x</var>, double <var>y</var>);
|
||||
float fmaxf(float <var>x</var>, float <var>y</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>fmax</code> functions determine the maximum numeric value of their arguments.
|
||||
NaN arguments are treated as missing data: if one argument is a NaN and the
|
||||
other numeric, then the <code>fmax</code> functions choose the numeric value.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The <code>fmax</code> functions return the maximum numeric value of their arguments.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>fmin - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="fmax.html#fmax" title="fmax">
|
||||
<link rel="next" href="fmod.html#fmod" title="fmod">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="fmin"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="fmod.html#fmod">fmod</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fmax.html#fmax">fmax</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.23 <code>fmin</code>, <code>fminf</code>–minimum</h3>
|
||||
|
||||
<p><a name="index-fmin-57"></a><a name="index-fminf-58"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double fmin(double <var>x</var>, double <var>y</var>);
|
||||
float fminf(float <var>x</var>, float <var>y</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>fmin</code> functions determine the minimum numeric value of their arguments.
|
||||
NaN arguments are treated as missing data: if one argument is a NaN and the
|
||||
other numeric, then the <code>fmin</code> functions choose the numeric value.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The <code>fmin</code> functions return the minimum numeric value of their arguments.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>fmod - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="fmin.html#fmin" title="fmin">
|
||||
<link rel="next" href="fpclassify.html#fpclassify" title="fpclassify">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="fmod"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="fpclassify.html#fpclassify">fpclassify</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fmin.html#fmin">fmin</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.24 <code>fmod</code>, <code>fmodf</code>—floating-point remainder (modulo)</h3>
|
||||
|
||||
<p><a name="index-fmod-59"></a><a name="index-fmodf-60"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double fmod(double <var>x</var>, double <var>y</var>)
|
||||
float fmodf(float <var>x</var>, float <var>y</var>)
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>fmod</code> and <code>fmodf</code> functions compute the floating-point
|
||||
remainder of <var>x</var>/<var>y</var> (<var>x</var> modulo <var>y</var>).
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The <code>fmod</code> function returns the value
|
||||
<var>x</var>-<var>i</var>*<var>y</var>,
|
||||
for the largest integer <var>i</var> such that, if <var>y</var> is nonzero, the
|
||||
result has the same sign as <var>x</var> and magnitude less than the
|
||||
magnitude of <var>y</var>.
|
||||
|
||||
<p><code>fmod(</code><var>x</var><code>,0)</code> returns NaN, and sets <code>errno</code> to <code>EDOM</code>.
|
||||
|
||||
<p>You can modify error treatment for these functions using <code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>fmod</code> is ANSI C. <code>fmodf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>fpclassify - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="fmod.html#fmod" title="fmod">
|
||||
<link rel="next" href="frexp.html#frexp" title="frexp">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="fpclassify"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="frexp.html#frexp">frexp</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fmod.html#fmod">fmod</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.31 <code>fpclassify</code>, <code>isfinite</code>, <code>isinf</code>, <code>isnan</code>, and <code>isnormal</code>–floating-point classification macros; <code>finite</code>, <code>finitef</code>, <code>isinf</code>, <code>isinff</code>, <code>isnan</code>, <code>isnanf</code>–test for exceptional numbers</h3>
|
||||
|
||||
<p><a name="index-fpclassify-85"></a><a name="index-isfinite-86"></a><a name="index-isinf-87"></a><a name="index-isnan-88"></a><a name="index-isnormal-89"></a><a name="index-isnan-90"></a><a name="index-isinf-91"></a><a name="index-finite-92"></a><a name="index-isnanf-93"></a><a name="index-isinff-94"></a><a name="index-finitef-95"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> [C99 standard macros:]
|
||||
#include <math.h>
|
||||
int fpclassify(real-floating <var>x</var>);
|
||||
int isfinite(real-floating <var>x</var>);
|
||||
int isinf(real-floating <var>x</var>);
|
||||
int isnan(real-floating <var>x</var>);
|
||||
int isnormal(real-floating <var>x</var>);
|
||||
|
||||
[Archaic SUSv2 functions:]
|
||||
#include <ieeefp.h>
|
||||
int isnan(double <var>arg</var>);
|
||||
int isinf(double <var>arg</var>);
|
||||
int finite(double <var>arg</var>);
|
||||
int isnanf(float <var>arg</var>);
|
||||
int isinff(float <var>arg</var>);
|
||||
int finitef(float <var>arg</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fpclassify</code>, <code>isfinite</code>, <code>isinf</code>, <code>isnan</code>, and <code>isnormal</code> are macros
|
||||
defined for use in classifying floating-point numbers. This is a help because
|
||||
of special "values" like NaN and infinities. In the synopses shown,
|
||||
"real-floating" indicates that the argument is an expression of real floating
|
||||
type. These function-like macros are C99 and POSIX-compliant, and should be
|
||||
used instead of the now-archaic SUSv2 functions.
|
||||
|
||||
<p>The <code>fpclassify</code> macro classifies its argument value as NaN, infinite, normal,
|
||||
subnormal, zero, or into another implementation-defined category. First, an
|
||||
argument represented in a format wider than its semantic type is converted to
|
||||
its semantic type. Then classification is based on the type of the argument.
|
||||
The <code>fpclassify</code> macro returns the value of the number classification macro
|
||||
appropriate to the value of its argument:
|
||||
|
||||
<dl>
|
||||
<dt><code>FP_INFINITE</code><dd><var>x</var> is either plus or minus infinity;
|
||||
<br><dt><code>FP_NAN</code><dd><var>x</var> is "Not A Number" (plus or minus);
|
||||
<br><dt><code>FP_NORMAL</code><dd><var>x</var> is a "normal" number (i.e. is none of the other special forms);
|
||||
<br><dt><code>FP_SUBNORMAL</code><dd><var>x</var> is too small be stored as a regular normalized number (i.e. loss of precision is likely); or
|
||||
<br><dt><code>FP_ZERO</code><dd><var>x</var> is 0 (either plus or minus).
|
||||
</dl>
|
||||
|
||||
<p>The "<code>is</code>" set of macros provide a useful set of shorthand ways for
|
||||
classifying floating-point numbers, providing the following equivalent
|
||||
relations:
|
||||
|
||||
<dl>
|
||||
<dt><code>isfinite(</code><var>x</var><code>)</code><dd>returns non-zero if <var>x</var> is finite. (It is equivalent to
|
||||
(<code>fpclassify</code>(<var>x</var>) != FP_INFINITE && <code>fpclassify</code>(<var>x</var>) != FP_NAN).)
|
||||
|
||||
<br><dt><code>isinf(</code><var>x</var><code>)</code><dd>returns non-zero if <var>x</var> is infinite. (It is equivalent to
|
||||
(<code>fpclassify</code>(<var>x</var>) == FP_INFINITE).)
|
||||
|
||||
<br><dt><code>isnan(</code><var>x</var><code>)</code><dd>returns non-zero if <var>x</var> is NaN. (It is equivalent to
|
||||
(<code>fpclassify</code>(<var>x</var>) == FP_NAN).)
|
||||
|
||||
<br><dt><code>isnormal(</code><var>x</var><code>)</code><dd>returns non-zero if <var>x</var> is normal. (It is equivalent to
|
||||
(<code>fpclassify</code>(<var>x</var>) == FP_NORMAL).)
|
||||
</dl>
|
||||
|
||||
<p>The archaic SUSv2 functions provide information on the floating-point
|
||||
argument supplied.
|
||||
|
||||
<p>There are five major number formats ("exponent" referring to the
|
||||
biased exponent in the binary-encoded number):
|
||||
<dl>
|
||||
<dt><code>zero</code><dd>A number which contains all zero bits, excluding the sign bit.
|
||||
<br><dt><code>subnormal</code><dd>A number with a zero exponent but a nonzero fraction.
|
||||
<br><dt><code>normal</code><dd>A number with an exponent and a fraction.
|
||||
<br><dt><code>infinity</code><dd>A number with an all 1's exponent and a zero fraction.
|
||||
<br><dt><code>NAN</code><dd>A number with an all 1's exponent and a nonzero fraction.
|
||||
|
||||
</dl>
|
||||
|
||||
<p><code>isnan</code> returns 1 if the argument is a nan. <code>isinf</code>
|
||||
returns 1 if the argument is infinity. <code>finite</code> returns 1 if the
|
||||
argument is zero, subnormal or normal.
|
||||
The <code>isnanf</code>, <code>isinff</code> and <code>finitef</code> functions perform the same
|
||||
operations as their <code>isnan</code>, <code>isinf</code> and <code>finite</code>
|
||||
counterparts, but on single-precision floating-point numbers.
|
||||
|
||||
<p>It should be noted that the C99 standard dictates that <code>isnan</code>
|
||||
and <code>isinf</code> are macros that operate on multiple types of
|
||||
floating-point. The SUSv2 standard declares <code>isnan</code> as
|
||||
a function taking double. Newlib has decided to declare
|
||||
them both as macros in math.h and as functions in ieeefp.h to
|
||||
maintain backward compatibility.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<!-- Formatting note: "$@" forces a new line -->
|
||||
The fpclassify macro returns the value corresponding to the appropriate FP_ macro.<br>
|
||||
The isfinite macro returns nonzero if <var>x</var> is finite, else 0.<br>
|
||||
The isinf macro returns nonzero if <var>x</var> is infinite, else 0.<br>
|
||||
The isnan macro returns nonzero if <var>x</var> is an NaN, else 0.<br>
|
||||
The isnormal macro returns nonzero if <var>x</var> has a normal value, else 0.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
math.h macros are C99, POSIX.
|
||||
|
||||
<p>ieeefp.h funtions are outdated and should be avoided.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>frexp - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="fpclassify.html#fpclassify" title="fpclassify">
|
||||
<link rel="next" href="gamma.html#gamma" title="gamma">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="frexp"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="gamma.html#gamma">gamma</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fpclassify.html#fpclassify">fpclassify</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.25 <code>frexp</code>, <code>frexpf</code>—split floating-point number</h3>
|
||||
|
||||
<p><a name="index-frexp-61"></a><a name="index-frexpf-62"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double frexp(double <var>val</var>, int *<var>exp</var>);
|
||||
float frexpf(float <var>val</var>, int *<var>exp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
All nonzero, normal numbers can be described as <var>m</var> * 2**<var>p</var>.
|
||||
<code>frexp</code> represents the double <var>val</var> as a mantissa <var>m</var>
|
||||
and a power of two <var>p</var>. The resulting mantissa will always
|
||||
be greater than or equal to <code>0.5</code>, and less than <code>1.0</code> (as
|
||||
long as <var>val</var> is nonzero). The power of two will be stored
|
||||
in <code>*</code><var>exp</var>.
|
||||
|
||||
<p><var>m</var> and <var>p</var> are calculated so that
|
||||
<var>val</var> is <var>m</var> times <code>2</code> to the power <var>p</var>.
|
||||
|
||||
<p><code>frexpf</code> is identical, other than taking and returning
|
||||
floats rather than doubles.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>frexp</code> returns the mantissa <var>m</var>. If <var>val</var> is <code>0</code>, infinity,
|
||||
or Nan, <code>frexp</code> will set <code>*</code><var>exp</var> to <code>0</code> and return <var>val</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>frexp</code> is ANSI.
|
||||
<code>frexpf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>gamma - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="frexp.html#frexp" title="frexp">
|
||||
<link rel="next" href="hypot.html#hypot" title="hypot">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="gamma"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="hypot.html#hypot">hypot</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="frexp.html#frexp">frexp</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.26 <code>gamma</code>, <code>gammaf</code>, <code>lgamma</code>, <code>lgammaf</code>, <code>gamma_r</code>, <code>gammaf_r</code>, <code>lgamma_r</code>, <code>lgammaf_r</code>, <code>tgamma</code>, and <code>tgammaf</code>–logarithmic and plain gamma functions</h3>
|
||||
|
||||
<p><a name="index-gamma-63"></a><a name="index-gammaf-64"></a><a name="index-lgamma-65"></a><a name="index-lgammaf-66"></a><a name="index-gamma_005fr-67"></a><a name="index-gammaf_005fr-68"></a><a name="index-lgamma_005fr-69"></a><a name="index-lgammaf_005fr-70"></a><a name="index-tgamma-71"></a><a name="index-tgammaf-72"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double gamma(double <var>x</var>);
|
||||
float gammaf(float <var>x</var>);
|
||||
double lgamma(double <var>x</var>);
|
||||
float lgammaf(float <var>x</var>);
|
||||
double gamma_r(double <var>x</var>, int *<var>signgamp</var>);
|
||||
float gammaf_r(float <var>x</var>, int *<var>signgamp</var>);
|
||||
double lgamma_r(double <var>x</var>, int *<var>signgamp</var>);
|
||||
float lgammaf_r(float <var>x</var>, int *<var>signgamp</var>);
|
||||
double tgamma(double <var>x</var>);
|
||||
float tgammaf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>gamma</code> calculates
|
||||
the natural logarithm of the gamma function of <var>x</var>. The gamma function
|
||||
(<code>exp(gamma(</code><var>x</var><code>))</code>) is a generalization of factorial, and retains
|
||||
the property that
|
||||
<code>exp(gamma(N))</code> is equivalent to <code>N*exp(gamma(N-1))</code>.
|
||||
Accordingly, the results of the gamma function itself grow very
|
||||
quickly. <code>gamma</code> is defined as
|
||||
the natural log of the gamma function, rather than the gamma function
|
||||
itself,
|
||||
to extend the useful range of results representable.
|
||||
|
||||
<p>The sign of the result is returned in the global variable <code>signgam</code>,
|
||||
which is declared in math.h.
|
||||
|
||||
<p><code>gammaf</code> performs the same calculation as <code>gamma</code>, but uses and
|
||||
returns <code>float</code> values.
|
||||
|
||||
<p><code>lgamma</code> and <code>lgammaf</code> are alternate names for <code>gamma</code> and
|
||||
<code>gammaf</code>. The use of <code>lgamma</code> instead of <code>gamma</code> is a reminder
|
||||
that these functions compute the log of the gamma function, rather
|
||||
than the gamma function itself.
|
||||
|
||||
<p>The functions <code>gamma_r</code>, <code>gammaf_r</code>, <code>lgamma_r</code>, and
|
||||
<code>lgammaf_r</code> are just like <code>gamma</code>, <code>gammaf</code>, <code>lgamma</code>, and
|
||||
<code>lgammaf</code>, respectively, but take an additional argument. This
|
||||
additional argument is a pointer to an integer. This additional
|
||||
argument is used to return the sign of the result, and the global
|
||||
variable <code>signgam</code> is not used. These functions may be used for
|
||||
reentrant calls (but they will still set the global variable <code>errno</code>
|
||||
if an error occurs).
|
||||
|
||||
<p><code>tgamma</code> and <code>tgammaf</code> are the "true gamma" functions, returning
|
||||
the gamma function of <var>x</var>–without a logarithm.
|
||||
(They are apparently so named because of the prior existence of the old,
|
||||
poorly-named <code>gamma</code> functions which returned the log of gamma up
|
||||
through BSD 4.2.)
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
Normally, the computed result is returned.
|
||||
|
||||
<p>When <var>x</var> is a nonpositive integer, <code>gamma</code> returns <code>HUGE_VAL</code>
|
||||
and <code>errno</code> is set to <code>EDOM</code>. If the result overflows, <code>gamma</code>
|
||||
returns <code>HUGE_VAL</code> and <code>errno</code> is set to <code>ERANGE</code>.
|
||||
|
||||
<p>You can modify this error treatment using <code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
Neither <code>gamma</code> nor <code>gammaf</code> is ANSI C. It is better not to use either
|
||||
of these; use <code>lgamma</code> or <code>tgamma</code> instead.<br>
|
||||
<code>lgamma</code>, <code>lgammaf</code>, <code>tgamma</code>, and <code>tgammaf</code> are nominally C standard
|
||||
in terms of the base return values, although the <code>matherr</code> error-handling
|
||||
is not standard, nor is the <var>signgam</var> global for <code>lgamma</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>hypot - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="gamma.html#gamma" title="gamma">
|
||||
<link rel="next" href="ilogb.html#ilogb" title="ilogb">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="hypot"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="ilogb.html#ilogb">ilogb</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="gamma.html#gamma">gamma</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.27 <code>hypot</code>, <code>hypotf</code>—distance from origin</h3>
|
||||
|
||||
<p><a name="index-hypot-73"></a><a name="index-hypotf-74"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double hypot(double <var>x</var>, double <var>y</var>);
|
||||
float hypotf(float <var>x</var>, float <var>y</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>hypot</code> calculates the Euclidean distance
|
||||
<code>sqrt(</code><var>x</var><code>*</code><var>x</var><code> + </code><var>y</var><code>*</code><var>y</var><code>)</code>
|
||||
between the origin (0,0) and a point represented by the
|
||||
Cartesian coordinates (<var>x</var>,<var>y</var>). <code>hypotf</code> differs only
|
||||
in the type of its arguments and result.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
Normally, the distance value is returned. On overflow,
|
||||
<code>hypot</code> returns <code>HUGE_VAL</code> and sets <code>errno</code> to
|
||||
<code>ERANGE</code>.
|
||||
|
||||
<p>You can change the error treatment with <code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>hypot</code> and <code>hypotf</code> are not ANSI C.
|
||||
<br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ilogb - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="hypot.html#hypot" title="hypot">
|
||||
<link rel="next" href="infinity.html#infinity" title="infinity">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="ilogb"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="infinity.html#infinity">infinity</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="hypot.html#hypot">hypot</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.28 <code>ilogb</code>, <code>ilogbf</code>—get exponent of floating-point number</h3>
|
||||
|
||||
<p><a name="index-ilogb-75"></a><a name="index-ilogbf-76"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
int ilogb(double <var>val</var>);
|
||||
int ilogbf(float <var>val</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
|
||||
<p>All nonzero, normal numbers can be described as <var>m</var> *
|
||||
2**<var>p</var>. <code>ilogb</code> and <code>ilogbf</code> examine the argument
|
||||
<var>val</var>, and return <var>p</var>. The functions <code>frexp</code> and
|
||||
<code>frexpf</code> are similar to <code>ilogb</code> and <code>ilogbf</code>, but also
|
||||
return <var>m</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
|
||||
<p><code>ilogb</code> and <code>ilogbf</code> return the power of two used to form the
|
||||
floating-point argument.
|
||||
If <var>val</var> is <code>0</code>, they return <code>FP_ILOGB0</code>.
|
||||
If <var>val</var> is infinite, they return <code>INT_MAX</code>.
|
||||
If <var>val</var> is NaN, they return <code>FP_ILOGBNAN</code>.
|
||||
(<code>FP_ILOGB0</code> and <code>FP_ILOGBNAN</code> are defined in math.h, but in turn are
|
||||
defined as INT_MIN or INT_MAX from limits.h. The value of FP_ILOGB0 may be
|
||||
either INT_MIN or -INT_MAX. The value of FP_ILOGBNAN may be either INT_MAX or
|
||||
INT_MIN.)
|
||||
|
||||
<!-- The bugs might not be worth noting, given the mass non-C99/POSIX -->
|
||||
<!-- behavior of much of the Newlib math library. -->
|
||||
<!-- BUGS -->
|
||||
<!-- On errors, errno is not set per C99 and POSIX requirements even if -->
|
||||
<!-- (math_errhandling & MATH_ERRNO) is non-zero. -->
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99, POSIX
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<div class="node">
|
||||
<a name="Top"></a>
|
||||
<p>
|
||||
Up: <a rel="up" accesskey="u" href="../index.html#dir">(dir)</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="unnumbered">Top</h2>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="../index.html#dir" title="(dir)">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Math.html#Math">Math</a>: The mathematical functions (`math.h').
|
||||
<li><a accesskey="2" href="Reentrancy.html#Reentrancy">Reentrancy</a>: The functions in libm are not reentrant by default.
|
||||
<li><a accesskey="3" href="Long-Double-Functions.html#Long-Double-Functions">Long Double Functions</a>: The long double function support of libm.
|
||||
<li><a accesskey="4" href="Library-Index.html#Library-Index">Library Index</a>
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>infinity - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="ilogb.html#ilogb" title="ilogb">
|
||||
<link rel="next" href="isgreater.html#isgreater" title="isgreater">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="infinity"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="isgreater.html#isgreater">isgreater</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="ilogb.html#ilogb">ilogb</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.29 <code>infinity</code>, <code>infinityf</code>–representation of infinity</h3>
|
||||
|
||||
<p><a name="index-infinity-77"></a><a name="index-infinityf-78"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double infinity(void);
|
||||
float infinityf(void);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>infinity</code> and <code>infinityf</code> return the special number IEEE
|
||||
infinity in double- and single-precision arithmetic
|
||||
respectively.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>infinity</code> and <code>infinityf</code> are neither standard C nor POSIX. C and
|
||||
POSIX require macros HUGE_VAL and HUGE_VALF to be defined in math.h, which
|
||||
Newlib defines to be infinities corresponding to these archaic infinity()
|
||||
and infinityf() functions in floating-point implementations which do have
|
||||
infinities.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>isgreater - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="infinity.html#infinity" title="infinity">
|
||||
<link rel="next" href="ldexp.html#ldexp" title="ldexp">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="isgreater"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="ldexp.html#ldexp">ldexp</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="infinity.html#infinity">infinity</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.30 <code>isgreater</code>, <code>isgreaterequal</code>, <code>isless</code>, <code>islessequal</code>, <code>islessgreater</code>, and <code>isunordered</code>–comparison macros</h3>
|
||||
|
||||
<p><a name="index-isgreater-79"></a><a name="index-isgreaterequal-80"></a><a name="index-isless-81"></a><a name="index-islessequal-82"></a><a name="index-islessgreater-83"></a><a name="index-isunordered-84"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
int isgreater(real-floating <var>x</var>, real-floating <var>y</var>);
|
||||
int isgreaterequal(real-floating <var>x</var>, real-floating <var>y</var>);
|
||||
int isless(real-floating <var>x</var>, real-floating <var>y</var>);
|
||||
int islessequal(real-floating <var>x</var>, real-floating <var>y</var>);
|
||||
int islessgreater(real-floating <var>x</var>, real-floating <var>y</var>);
|
||||
int isunordered(real-floating <var>x</var>, real-floating <var>y</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>isgreater</code>, <code>isgreaterequal</code>, <code>isless</code>, <code>islessequal</code>,
|
||||
<code>islessgreater</code>, and <code>isunordered</code> are macros defined for use in
|
||||
comparing floating-point numbers without raising any floating-point
|
||||
exceptions.
|
||||
|
||||
<p>The relational operators (i.e. <, >, <=, and >=) support the usual mathematical
|
||||
relationships between numeric values. For any ordered pair of numeric
|
||||
values exactly one of the relationships–less, greater, and equal–is
|
||||
true. Relational operators may raise the "invalid" floating-point
|
||||
exception when argument values are NaNs. For a NaN and a numeric value, or
|
||||
for two NaNs, just the unordered relationship is true (i.e., if one or both
|
||||
of the arguments a NaN, the relationship is called unordered). The specified
|
||||
macros are quiet (non floating-point exception raising) versions of the
|
||||
relational operators, and other comparison macros that facilitate writing
|
||||
efficient code that accounts for NaNs without suffering the "invalid"
|
||||
floating-point exception. In the synopses shown, "real-floating" indicates
|
||||
that the argument is an expression of real floating type.
|
||||
|
||||
<p>Please note that saying that the macros do not raise floating-point
|
||||
exceptions, it is referring to the function that they are performing. It
|
||||
is certainly possible to give them an expression which causes an exception.
|
||||
For example:
|
||||
<dl>
|
||||
<dt><code>NaN < 1.0</code><dd>causes an "invalid" exception,
|
||||
<br><dt><code>isless(NaN, 1.0)</code><dd>does not, and
|
||||
<br><dt><code>isless(NaN*0., 1.0)</code><dd>causes an exception due to the "NaN*0.", but not from the
|
||||
resultant reduced comparison of isless(NaN, 1.0).
|
||||
</dl>
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<!-- Formatting note: "$@" forces a new line -->
|
||||
No floating-point exceptions are raised for any of the macros.<br>
|
||||
The <code>isgreater</code> macro returns the value of (x) > (y).<br>
|
||||
The <code>isgreaterequal</code> macro returns the value of (x) >= (y).<br>
|
||||
The <code>isless</code> macro returns the value of (x) < (y).<br>
|
||||
The <code>islessequal</code> macro returns the value of (x) <= (y).<br>
|
||||
The <code>islessgreater</code> macro returns the value of (x) < (y) || (x) > (y).<br>
|
||||
The <code>isunordered</code> macro returns 1 if either of its arguments is NaN and 0 otherwise.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99, POSIX.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>jN - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="atanh.html#atanh" title="atanh">
|
||||
<link rel="next" href="cbrt.html#cbrt" title="cbrt">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="jN"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="cbrt.html#cbrt">cbrt</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="atanh.html#atanh">atanh</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.10 <code>jN</code>, <code>jNf</code>, <code>yN</code>, <code>yNf</code>—Bessel functions</h3>
|
||||
|
||||
<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>
|
||||
<pre class="example"> #include <math.h>
|
||||
double j0(double <var>x</var>);
|
||||
float j0f(float <var>x</var>);
|
||||
double j1(double <var>x</var>);
|
||||
float j1f(float <var>x</var>);
|
||||
double jn(int <var>n</var>, double <var>x</var>);
|
||||
float jnf(int <var>n</var>, float <var>x</var>);
|
||||
double y0(double <var>x</var>);
|
||||
float y0f(float <var>x</var>);
|
||||
double y1(double <var>x</var>);
|
||||
float y1f(float <var>x</var>);
|
||||
double yn(int <var>n</var>, double <var>x</var>);
|
||||
float ynf(int <var>n</var>, float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The Bessel functions are a family of functions that solve the
|
||||
differential equation
|
||||
<pre class="smallexample"> 2 2 2
|
||||
x y'' + xy' + (x - p )y = 0
|
||||
</pre>
|
||||
<p>These functions have many applications in engineering and physics.
|
||||
|
||||
<p><code>jn</code> calculates the Bessel function of the first kind of order
|
||||
<var>n</var>. <code>j0</code> and <code>j1</code> are special cases for order 0 and order
|
||||
1 respectively.
|
||||
|
||||
<p>Similarly, <code>yn</code> calculates the Bessel function of the second kind of
|
||||
order <var>n</var>, and <code>y0</code> and <code>y1</code> are special cases for order 0 and
|
||||
1.
|
||||
|
||||
<p><code>jnf</code>, <code>j0f</code>, <code>j1f</code>, <code>ynf</code>, <code>y0f</code>, and <code>y1f</code> perform the
|
||||
same calculations, but on <code>float</code> rather than <code>double</code> values.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The value of each Bessel function at <var>x</var> is returned.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
None of the Bessel functions are in ANSI C.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ldexp - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="isgreater.html#isgreater" title="isgreater">
|
||||
<link rel="next" href="log.html#log" title="log">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="ldexp"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="log.html#log">log</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="isgreater.html#isgreater">isgreater</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.32 <code>ldexp</code>, <code>ldexpf</code>—load exponent</h3>
|
||||
|
||||
<p><a name="index-ldexp-96"></a><a name="index-ldexpf-97"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double ldexp(double <var>val</var>, int <var>exp</var>);
|
||||
float ldexpf(float <var>val</var>, int <var>exp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>ldexp</code> calculates the value
|
||||
<var>val</var> times 2 to the power <var>exp</var>.
|
||||
<code>ldexpf</code> is identical, save that it takes and returns <code>float</code>
|
||||
rather than <code>double</code> values.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>ldexp</code> returns the calculated value.
|
||||
|
||||
<p>Underflow and overflow both set <code>errno</code> to <code>ERANGE</code>.
|
||||
On underflow, <code>ldexp</code> and <code>ldexpf</code> return 0.0.
|
||||
On overflow, <code>ldexp</code> returns plus or minus <code>HUGE_VAL</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>ldexp</code> is ANSI. <code>ldexpf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>log - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="ldexp.html#ldexp" title="ldexp">
|
||||
<link rel="next" href="log10.html#log10" title="log10">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="log"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="log10.html#log10">log10</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="ldexp.html#ldexp">ldexp</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.33 <code>log</code>, <code>logf</code>—natural logarithms</h3>
|
||||
|
||||
<p><a name="index-log-98"></a><a name="index-logf-99"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double log(double <var>x</var>);
|
||||
float logf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Return the natural logarithm of <var>x</var>, that is, its logarithm base e
|
||||
(where e is the base of the natural system of logarithms, 2.71828<small class="dots">...</small>).
|
||||
<code>log</code> and <code>logf</code> are identical save for the return and argument types.
|
||||
|
||||
<p>You can use the (non-ANSI) function <code>matherr</code> to specify error
|
||||
handling for these functions.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
Normally, returns the calculated value. When <var>x</var> is zero, the
|
||||
returned value is <code>-HUGE_VAL</code> and <code>errno</code> is set to <code>ERANGE</code>.
|
||||
When <var>x</var> is negative, the returned value is NaN (not a number) and
|
||||
<code>errno</code> is set to <code>EDOM</code>. You can control the error behavior via
|
||||
<code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>log</code> is ANSI. <code>logf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>log10 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="log.html#log" title="log">
|
||||
<link rel="next" href="log1p.html#log1p" title="log1p">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="log10"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="log1p.html#log1p">log1p</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="log.html#log">log</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.34 <code>log10</code>, <code>log10f</code>—base 10 logarithms</h3>
|
||||
|
||||
<p><a name="index-log10-100"></a><a name="index-log10f-101"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double log10(double <var>x</var>);
|
||||
float log10f(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>log10</code> returns the base 10 logarithm of <var>x</var>.
|
||||
It is implemented as <code>log(</code><var>x</var><code>) / log(10)</code>.
|
||||
|
||||
<p><code>log10f</code> is identical, save that it takes and returns <code>float</code> values.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>log10</code> and <code>log10f</code> return the calculated value.
|
||||
|
||||
<p>See the description of <code>log</code> for information on errors.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>log10</code> is ANSI C. <code>log10f</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>log1p - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="log10.html#log10" title="log10">
|
||||
<link rel="next" href="log2.html#log2" title="log2">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="log1p"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="log2.html#log2">log2</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="log10.html#log10">log10</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.35 <code>log1p</code>, <code>log1pf</code>—log of <code>1 + </code><var>x</var></h3>
|
||||
|
||||
<p><a name="index-log1p-102"></a><a name="index-log1pf-103"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double log1p(double <var>x</var>);
|
||||
float log1pf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>log1p</code> calculates
|
||||
the natural logarithm of <code>1+</code><var>x</var>. You can use <code>log1p</code> rather
|
||||
than `<code>log(1+</code><var>x</var><code>)</code>' for greater precision when <var>x</var> is very
|
||||
small.
|
||||
|
||||
<p><code>log1pf</code> calculates the same thing, but accepts and returns
|
||||
<code>float</code> values rather than <code>double</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>log1p</code> returns a <code>double</code>, the natural log of <code>1+</code><var>x</var>.
|
||||
<code>log1pf</code> returns a <code>float</code>, the natural log of <code>1+</code><var>x</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
Neither <code>log1p</code> nor <code>log1pf</code> is required by ANSI C or by the System V
|
||||
Interface Definition (Issue 2).
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>log2 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="log1p.html#log1p" title="log1p">
|
||||
<link rel="next" href="logb.html#logb" title="logb">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="log2"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="logb.html#logb">logb</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="log1p.html#log1p">log1p</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.36 <code>log2</code>, <code>log2f</code>–base 2 logarithm</h3>
|
||||
|
||||
<p><a name="index-log2-104"></a><a name="index-log2f-105"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double log2(double <var>x</var>);
|
||||
float log2f(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>log2</code> functions compute the base-2 logarithm of <var>x</var>. A domain error
|
||||
occurs if the argument is less than zero. A range error occurs if the
|
||||
argument is zero.
|
||||
|
||||
<p>The Newlib implementations are not full, intrinisic calculations, but
|
||||
rather are derivatives based on <code>log</code>. (Accuracy might be slightly off from
|
||||
a direct calculation.) In addition to functions, they are also implemented as
|
||||
macros defined in math.h:
|
||||
<pre class="smallexample"> #define log2(x) (log (x) / _M_LOG2_E)
|
||||
#define log2f(x) (logf (x) / (float) _M_LOG2_E)
|
||||
</pre>
|
||||
<p>To use the functions instead, just undefine the macros first.
|
||||
|
||||
<p>You can use the (non-ANSI) function <code>matherr</code> to specify error
|
||||
handling for these functions, indirectly through the respective <code>log</code>
|
||||
function.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The <code>log2</code> functions return
|
||||
<code>log base-2(</code><var>x</var><code>)</code>
|
||||
on success.
|
||||
When <var>x</var> is zero, the
|
||||
returned value is <code>-HUGE_VAL</code> and <code>errno</code> is set to <code>ERANGE</code>.
|
||||
When <var>x</var> is negative, the returned value is NaN (not a number) and
|
||||
<code>errno</code> is set to <code>EDOM</code>. You can control the error behavior via
|
||||
<code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99, POSIX, System V Interface Definition (Issue 6).
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>logb - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="log2.html#log2" title="log2">
|
||||
<link rel="next" href="lrint.html#lrint" title="lrint">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="logb"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="lrint.html#lrint">lrint</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="log2.html#log2">log2</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.37 <code>logb</code>, <code>logbf</code>–get exponent of floating-point number</h3>
|
||||
|
||||
<p><a name="index-logb-106"></a><a name="index-logbf-107"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double logb(double <var>x</var>);
|
||||
float logbf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>logb</code> functions extract the exponent of <var>x</var>, as a signed integer value
|
||||
in floating-point format. If <var>x</var> is subnormal it is treated as though it were
|
||||
normalized; thus, for positive finite <var>x</var>,
|
||||
1 <= (<var>x</var> * FLT_RADIX to the power (-logb(<var>x</var>))) < FLT_RADIX.
|
||||
A domain error may occur if the argument is zero.
|
||||
In this floating-point implementation, FLT_RADIX is 2. Which also means
|
||||
that for finite <var>x</var>, <code>logb</code>(<var>x</var>) = <code>floor</code>(<code>log2</code>(<code>fabs</code>(<var>x</var>))).
|
||||
|
||||
<p>All nonzero, normal numbers can be described as
|
||||
<var>m</var> * 2**<var>p</var>, where 1.0 <= <var>m</var> < 2.0.
|
||||
The <code>logb</code> functions examine the argument <var>x</var>, and return <var>p</var>.
|
||||
The <code>frexp</code> functions are similar to the <code>logb</code> functions, but
|
||||
returning <var>m</var> adjusted to the interval [.5, 1) or 0, and <var>p</var>+1.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<!-- Formatting note: "$@" forces a new line -->
|
||||
When <var>x</var> is:<br>
|
||||
+inf or -inf, +inf is returned;<br>
|
||||
NaN, NaN is returned;<br>
|
||||
0, -inf is returned, and the divide-by-zero exception is raised;<br>
|
||||
otherwise, the <code>logb</code> functions return the signed exponent of <var>x</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX
|
||||
|
||||
<p><br>
|
||||
<strong>See Also</strong><br>
|
||||
frexp, ilogb
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>lrint - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="logb.html#logb" title="logb">
|
||||
<link rel="next" href="lround.html#lround" title="lround">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="lrint"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="lround.html#lround">lround</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="logb.html#logb">logb</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.38 <code>lrint</code>, <code>lrintf</code>, <code>llrint</code>, <code>llrintf</code>–round to integer</h3>
|
||||
|
||||
<p><a name="index-lrint-108"></a><a name="index-lrintf-109"></a><a name="index-llrint-110"></a><a name="index-llrintf-111"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
long int lrint(double <var>x</var>);
|
||||
long int lrintf(float <var>x</var>);
|
||||
long long int llrint(double <var>x</var>);
|
||||
long long int llrintf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>lrint</code> and <code>llrint</code> functions round their argument to the nearest
|
||||
integer value, using the current rounding direction. If the rounded value is
|
||||
outside the range of the return type, the numeric result is unspecified. A
|
||||
range error may occur if the magnitude of <var>x</var> is too large.
|
||||
The "inexact" floating-point exception is raised in implementations that
|
||||
support it when the result differs in value from the argument (i.e., when
|
||||
a fraction actually has been truncated).
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<var>x</var> rounded to an integral value, using the current rounding direction.
|
||||
|
||||
<p><br>
|
||||
<strong>See Also</strong><br>
|
||||
<code>lround</code>
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>lround - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="lrint.html#lrint" title="lrint">
|
||||
<link rel="next" href="matherr.html#matherr" title="matherr">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="lround"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="matherr.html#matherr">matherr</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="lrint.html#lrint">lrint</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.39 <code>lround</code>, <code>lroundf</code>, <code>llround</code>, <code>llroundf</code>–round to integer, to nearest</h3>
|
||||
|
||||
<p><a name="index-lround-112"></a><a name="index-lroundf-113"></a><a name="index-llround-114"></a><a name="index-llroundf-115"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
long int lround(double <var>x</var>);
|
||||
long int lroundf(float <var>x</var>);
|
||||
long long int llround(double <var>x</var>);
|
||||
long long int llroundf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>lround</code> and <code>llround</code> functions round their argument to the
|
||||
nearest integer value, rounding halfway cases away from zero, regardless
|
||||
of the current rounding direction. If the rounded value is outside the
|
||||
range of the return type, the numeric result is unspecified (depending
|
||||
upon the floating-point implementation, not the library). A range
|
||||
error may occur if the magnitude of x is too large.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<var>x</var> rounded to an integral value as an integer.
|
||||
|
||||
<p><br>
|
||||
<strong>See Also</strong><br>
|
||||
See the <code>round</code> functions for the return being the same floating-point type
|
||||
as the argument. <code>lrint</code>, <code>llrint</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>matherr - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="lround.html#lround" title="lround">
|
||||
<link rel="next" href="modf.html#modf" title="modf">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="matherr"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="modf.html#modf">modf</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="lround.html#lround">lround</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.40 <code>matherr</code>—modifiable math error handler</h3>
|
||||
|
||||
<p><a name="index-matherr-116"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
int matherr(struct exception *<var>e</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>matherr</code> is called whenever a math library function generates an error.
|
||||
You can replace <code>matherr</code> by your own subroutine to customize
|
||||
error treatment. The customized <code>matherr</code> must return 0 if
|
||||
it fails to resolve the error, and non-zero if the error is resolved.
|
||||
|
||||
<p>When <code>matherr</code> returns a nonzero value, no error message is printed
|
||||
and the value of <code>errno</code> is not modified. You can accomplish either
|
||||
or both of these things in your own <code>matherr</code> using the information
|
||||
passed in the structure <code>*</code><var>e</var>.
|
||||
|
||||
<p>This is the <code>exception</code> structure (defined in `<code>math.h</code>'):
|
||||
<pre class="smallexample"> struct exception {
|
||||
int type;
|
||||
char *name;
|
||||
double arg1, arg2, retval;
|
||||
int err;
|
||||
};
|
||||
</pre>
|
||||
<p>The members of the exception structure have the following meanings:
|
||||
<dl>
|
||||
<dt><code>type</code><dd>The type of mathematical error that occured; macros encoding error
|
||||
types are also defined in `<code>math.h</code>'.
|
||||
|
||||
<br><dt><code>name</code><dd>a pointer to a null-terminated string holding the
|
||||
name of the math library function where the error occurred.
|
||||
|
||||
<br><dt><code>arg1, arg2</code><dd>The arguments which caused the error.
|
||||
|
||||
<br><dt><code>retval</code><dd>The error return value (what the calling function will return).
|
||||
|
||||
<br><dt><code>err</code><dd>If set to be non-zero, this is the new value assigned to <code>errno</code>.
|
||||
</dl>
|
||||
|
||||
<p>The error types defined in `<code>math.h</code>' represent possible mathematical
|
||||
errors as follows:
|
||||
|
||||
<dl>
|
||||
<dt><code>DOMAIN</code><dd>An argument was not in the domain of the function; e.g. <code>log(-1.0)</code>.
|
||||
|
||||
<br><dt><code>SING</code><dd>The requested calculation would result in a singularity; e.g. <code>pow(0.0,-2.0)</code>
|
||||
|
||||
<br><dt><code>OVERFLOW</code><dd>A calculation would produce a result too large to represent; e.g.
|
||||
<code>exp(1000.0)</code>.
|
||||
|
||||
<br><dt><code>UNDERFLOW</code><dd>A calculation would produce a result too small to represent; e.g.
|
||||
<code>exp(-1000.0)</code>.
|
||||
|
||||
<br><dt><code>TLOSS</code><dd>Total loss of precision. The result would have no significant digits;
|
||||
e.g. <code>sin(10e70)</code>.
|
||||
|
||||
<br><dt><code>PLOSS</code><dd>Partial loss of precision.
|
||||
</dl>
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The library definition for <code>matherr</code> returns <code>0</code> in all cases.
|
||||
|
||||
<p>You can change the calling function's result from a customized <code>matherr</code>
|
||||
by modifying <code>e->retval</code>, which propagates backs to the caller.
|
||||
|
||||
<p>If <code>matherr</code> returns <code>0</code> (indicating that it was not able to resolve
|
||||
the error) the caller sets <code>errno</code> to an appropriate value, and prints
|
||||
an error message.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>matherr</code> is not ANSI C.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>modf - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="matherr.html#matherr" title="matherr">
|
||||
<link rel="next" href="nan.html#nan" title="nan">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="modf"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="nan.html#nan">nan</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="matherr.html#matherr">matherr</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.41 <code>modf</code>, <code>modff</code>—split fractional and integer parts</h3>
|
||||
|
||||
<p><a name="index-modf-117"></a><a name="index-modff-118"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double modf(double <var>val</var>, double *<var>ipart</var>);
|
||||
float modff(float <var>val</var>, float *<var>ipart</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>modf</code> splits the double <var>val</var> apart into an integer part
|
||||
and a fractional part, returning the fractional part and
|
||||
storing the integer part in <code>*</code><var>ipart</var>. No rounding
|
||||
whatsoever is done; the sum of the integer and fractional
|
||||
parts is guaranteed to be exactly equal to <var>val</var>. That
|
||||
is, if <var>realpart</var> = modf(<var>val</var>, &<var>intpart</var>); then
|
||||
`<var>realpart</var><code>+</code><var>intpart</var>' is the same as <var>val</var>.
|
||||
<code>modff</code> is identical, save that it takes and returns
|
||||
<code>float</code> rather than <code>double</code> values.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The fractional part is returned. Each result has the same
|
||||
sign as the supplied argument <var>val</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>modf</code> is ANSI C. <code>modff</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>nan - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="modf.html#modf" title="modf">
|
||||
<link rel="next" href="nearbyint.html#nearbyint" title="nearbyint">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="nan"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="nearbyint.html#nearbyint">nearbyint</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="modf.html#modf">modf</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.42 <code>nan</code>, <code>nanf</code>—representation of “Not a Number”</h3>
|
||||
|
||||
<p><a name="index-nan-119"></a><a name="index-nanf-120"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double nan(const char *);
|
||||
float nanf(const char *);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>nan</code> and <code>nanf</code> return an IEEE NaN (Not a Number) in
|
||||
double- and single-precision arithmetic respectively. The
|
||||
argument is currently disregarded.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>nearbyint - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="nan.html#nan" title="nan">
|
||||
<link rel="next" href="nextafter.html#nextafter" title="nextafter">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="nearbyint"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="nextafter.html#nextafter">nextafter</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="nan.html#nan">nan</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.43 <code>nearbyint</code>, <code>nearbyintf</code>–round to integer</h3>
|
||||
|
||||
<p><a name="index-nearbyint-121"></a><a name="index-nearbyintf-122"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double nearbyint(double <var>x</var>);
|
||||
float nearbyintf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>nearbyint</code> functions round their argument to an integer value in
|
||||
floating-point format, using the current rounding direction and
|
||||
(supposedly) without raising the "inexact" floating-point exception.
|
||||
See the <code>rint</code> functions for the same function with the "inexact"
|
||||
floating-point exception being raised when appropriate.
|
||||
|
||||
<p><br>
|
||||
<strong>Bugs</strong><br>
|
||||
Newlib does not support the floating-point exception model, so that
|
||||
the floating-point exception control is not present and thereby what may
|
||||
be seen will be compiler and hardware dependent in this regard.
|
||||
The Newlib <code>nearbyint</code> functions are identical to the <code>rint</code>
|
||||
functions with respect to the floating-point exception behavior, and
|
||||
will cause the "inexact" exception to be raised for most targets.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<var>x</var> rounded to an integral value, using the current rounding direction.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX
|
||||
|
||||
<p><br>
|
||||
<strong>See Also</strong><br>
|
||||
<code>rint</code>, <code>round</code>
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>nextafter - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="nearbyint.html#nearbyint" title="nearbyint">
|
||||
<link rel="next" href="pow.html#pow" title="pow">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="nextafter"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="pow.html#pow">pow</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="nearbyint.html#nearbyint">nearbyint</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.44 <code>nextafter</code>, <code>nextafterf</code>—get next number</h3>
|
||||
|
||||
<p><a name="index-nextafter-123"></a><a name="index-nextafterf-124"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double nextafter(double <var>val</var>, double <var>dir</var>);
|
||||
float nextafterf(float <var>val</var>, float <var>dir</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>nextafter</code> returns the double-precision floating-point number
|
||||
closest to <var>val</var> in the direction toward <var>dir</var>. <code>nextafterf</code>
|
||||
performs the same operation in single precision. For example,
|
||||
<code>nextafter(0.0,1.0)</code> returns the smallest positive number which is
|
||||
representable in double precision.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
Returns the next closest number to <var>val</var> in the direction toward
|
||||
<var>dir</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
Neither <code>nextafter</code> nor <code>nextafterf</code> is required by ANSI C
|
||||
or by the System V Interface Definition (Issue 2).
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>pow - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="nextafter.html#nextafter" title="nextafter">
|
||||
<link rel="next" href="remainder.html#remainder" title="remainder">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="pow"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="remainder.html#remainder">remainder</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="nextafter.html#nextafter">nextafter</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.45 <code>pow</code>, <code>powf</code>—x to the power y</h3>
|
||||
|
||||
<p><a name="index-pow-125"></a><a name="index-powf-126"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double pow(double <var>x</var>, double <var>y</var>);
|
||||
float powf(float <var>x</var>, float <var>y</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>pow</code> and <code>powf</code> calculate <var>x</var> raised to the exponent <var>y</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
On success, <code>pow</code> and <code>powf</code> return the value calculated.
|
||||
|
||||
<p>When the argument values would produce overflow, <code>pow</code>
|
||||
returns <code>HUGE_VAL</code> and set <code>errno</code> to <code>ERANGE</code>. If the
|
||||
argument <var>x</var> passed to <code>pow</code> or <code>powf</code> is a negative
|
||||
noninteger, and <var>y</var> is also not an integer, then <code>errno</code>
|
||||
is set to <code>EDOM</code>. If <var>x</var> and <var>y</var> are both 0, then
|
||||
<code>pow</code> and <code>powf</code> return <code>1</code>.
|
||||
|
||||
<p>You can modify error handling for these functions using <code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>pow</code> is ANSI C. <code>powf</code> is an extension.
|
||||
<br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>remainder - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="pow.html#pow" title="pow">
|
||||
<link rel="next" href="remquo.html#remquo" title="remquo">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="remainder"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="remquo.html#remquo">remquo</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="pow.html#pow">pow</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.46 <code>remainder</code>, <code>remainderf</code>—round and remainder</h3>
|
||||
|
||||
<p><a name="index-remainder-127"></a><a name="index-remainderf-128"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double remainder(double <var>x</var>, double <var>y</var>);
|
||||
float remainderf(float <var>x</var>, float <var>y</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>remainder</code> and <code>remainderf</code> find the remainder of
|
||||
<var>x</var>/<var>y</var>; this value is in the range -<var>y</var>/2 .. +<var>y</var>/2.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>remainder</code> returns the integer result as a double.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>remainder</code> is a System V release 4.
|
||||
<code>remainderf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>remquo - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="remainder.html#remainder" title="remainder">
|
||||
<link rel="next" href="rint.html#rint" title="rint">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="remquo"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="rint.html#rint">rint</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="remainder.html#remainder">remainder</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.47 <code>remquo</code>, <code>remquof</code>–remainder and part of quotient</h3>
|
||||
|
||||
<p><a name="index-remquo-129"></a><a name="index-remquof-130"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double remquo(double <var>x</var>, double <var>y</var>, int *<var>quo</var>);
|
||||
float remquof(float <var>x</var>, float <var>y</var>, int *<var>quo</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>remquo</code> functions compute the same remainder as the <code>remainder</code>
|
||||
functions; this value is in the range -<var>y</var>/2 ... +<var>y</var>/2. In the object
|
||||
pointed to by <code>quo</code> they store a value whose sign is the sign of <code>x</code>/<code>y</code>
|
||||
and whose magnitude is congruent modulo 2**n to the magnitude of the integral
|
||||
quotient of <code>x</code>/<code>y</code>. (That is, <code>quo</code> is given the n lsbs of the
|
||||
quotient, not counting the sign.) This implementation uses n=31 if int is 32
|
||||
bits or more, otherwise, n is 1 less than the width of int.
|
||||
|
||||
<p>For example:
|
||||
<pre class="smallexample"> remquo(-29.0, 3.0, &<var>quo</var>)
|
||||
</pre>
|
||||
<p>returns -1.0 and sets <var>quo</var>=10, and
|
||||
<pre class="smallexample"> remquo(-98307.0, 3.0, &<var>quo</var>)
|
||||
</pre>
|
||||
<p>returns -0.0 and sets <var>quo</var>=-32769, although for 16-bit int, <var>quo</var>=-1. In
|
||||
the latter case, the actual quotient of -(32769=0x8001) is reduced to -1
|
||||
because of the 15-bit limitation for the quotient.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
When either argument is NaN, NaN is returned. If <var>y</var> is 0 or <var>x</var> is
|
||||
infinite (and neither is NaN), a domain error occurs (i.e. the "invalid"
|
||||
floating point exception is raised or errno is set to EDOM), and NaN is
|
||||
returned.
|
||||
Otherwise, the <code>remquo</code> functions return <var>x</var> REM <var>y</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Bugs</strong><br>
|
||||
IEEE754-2008 calls for <code>remquo</code>(subnormal, inf) to cause the "underflow"
|
||||
floating-point exception. This implementation does not.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99, POSIX.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>rint - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="remquo.html#remquo" title="remquo">
|
||||
<link rel="next" href="round.html#round" title="round">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="rint"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="round.html#round">round</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="remquo.html#remquo">remquo</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.48 <code>rint</code>, <code>rintf</code>–round to integer</h3>
|
||||
|
||||
<p><a name="index-rint-131"></a><a name="index-rintf-132"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double rint(double <var>x</var>);
|
||||
float rintf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>rint</code> functions round their argument to an integer value in
|
||||
floating-point format, using the current rounding direction. They
|
||||
raise the "inexact" floating-point exception if the result differs
|
||||
in value from the argument. See the <code>nearbyint</code> functions for the
|
||||
same function with the "inexact" floating-point exception never being
|
||||
raised. Newlib does not directly support floating-point exceptions.
|
||||
The <code>rint</code> functions are written so that the "inexact" exception is
|
||||
raised in hardware implementations that support it, even though Newlib
|
||||
does not provide access.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<var>x</var> rounded to an integral value, using the current rounding direction.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX
|
||||
|
||||
<p><br>
|
||||
<strong>See Also</strong><br>
|
||||
<code>nearbyint</code>, <code>round</code>
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>round - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="rint.html#rint" title="rint">
|
||||
<link rel="next" href="scalbn.html#scalbn" title="scalbn">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="round"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="scalbn.html#scalbn">scalbn</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="rint.html#rint">rint</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.49 <code>round</code>, <code>roundf</code>–round to integer, to nearest</h3>
|
||||
|
||||
<p><a name="index-round-133"></a><a name="index-roundf-134"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double round(double <var>x</var>);
|
||||
float roundf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>round</code> functions round their argument to the nearest integer
|
||||
value in floating-point format, rounding halfway cases away from zero,
|
||||
regardless of the current rounding direction. (While the "inexact"
|
||||
floating-point exception behavior is unspecified by the C standard, the
|
||||
<code>round</code> functions are written so that "inexact" is not raised if the
|
||||
result does not equal the argument, which behavior is as recommended by
|
||||
IEEE 754 for its related functions.)
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<var>x</var> rounded to an integral value.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX
|
||||
|
||||
<p><br>
|
||||
<strong>See Also</strong><br>
|
||||
<code>nearbyint</code>, <code>rint</code>
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>scalbn - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="round.html#round" title="round">
|
||||
<link rel="next" href="signbit.html#signbit" title="signbit">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="scalbn"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="signbit.html#signbit">signbit</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="round.html#round">round</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.50 <code>scalbn</code>, <code>scalbnf</code>, <code>scalbln</code>, <code>scalblnf</code>–scale by power of FLT_RADIX (=2)</h3>
|
||||
|
||||
<p><a name="index-scalbn-135"></a><a name="index-scalbnf-136"></a><a name="index-scalbln-137"></a><a name="index-scalblnf-138"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double scalbn(double <var>x</var>, int <var>n</var>);
|
||||
float scalbnf(float <var>x</var>, int <var>n</var>);
|
||||
double scalbln(double <var>x</var>, long int <var>n</var>);
|
||||
float scalblnf(float <var>x</var>, long int <var>n</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>scalbn</code> and <code>scalbln</code> functions compute
|
||||
<var>x</var> times FLT_RADIX to the power <var>n</var>.
|
||||
efficiently. The result is computed by manipulating the exponent, rather than
|
||||
by actually performing an exponentiation or multiplication. In this
|
||||
floating-point implementation FLT_RADIX=2, which makes the <code>scalbn</code>
|
||||
functions equivalent to the <code>ldexp</code> functions.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<var>x</var> times 2 to the power <var>n</var>. A range error may occur.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX
|
||||
|
||||
<p><br>
|
||||
<strong>See Also</strong><br>
|
||||
<code>ldexp</code>
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>signbit - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="scalbn.html#scalbn" title="scalbn">
|
||||
<link rel="next" href="sin.html#sin" title="sin">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="signbit"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="sin.html#sin">sin</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="scalbn.html#scalbn">scalbn</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.51 <code>signbit</code>–Does floating-point number have negative sign?</h3>
|
||||
|
||||
<p><a name="index-signbit-139"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
int signbit(real-floating <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>signbit</code> macro determines whether the sign of its argument value is
|
||||
negative. The macro reports the sign of all values, including infinities,
|
||||
zeros, and NaNs. If zero is unsigned, it is treated as positive. As shown in
|
||||
the synopsis, the argument is "real-floating," meaning that any of the real
|
||||
floating-point types (float, double, etc.) may be given to it.
|
||||
|
||||
<p>Note that because of the possibilities of signed 0 and NaNs, the expression
|
||||
"<var>x</var> < 0.0" does not give the same result as <code>signbit</code> in all cases.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The <code>signbit</code> macro returns a nonzero value if and only if the sign of its
|
||||
argument value is negative.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99, POSIX.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>sin - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="signbit.html#signbit" title="signbit">
|
||||
<link rel="next" href="sinh.html#sinh" title="sinh">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="sin"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="sinh.html#sinh">sinh</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="signbit.html#signbit">signbit</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.52 <code>sin</code>, <code>sinf</code>, <code>cos</code>, <code>cosf</code>—sine or cosine</h3>
|
||||
|
||||
<p><a name="index-sin-140"></a><a name="index-sinf-141"></a><a name="index-cos-142"></a><a name="index-cosf-143"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double sin(double <var>x</var>);
|
||||
float sinf(float <var>x</var>);
|
||||
double cos(double <var>x</var>);
|
||||
float cosf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>sin</code> and <code>cos</code> compute (respectively) the sine and cosine
|
||||
of the argument <var>x</var>. Angles are specified in radians.
|
||||
|
||||
<p><code>sinf</code> and <code>cosf</code> are identical, save that they take and
|
||||
return <code>float</code> values.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The sine or cosine of <var>x</var> is returned.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>sin</code> and <code>cos</code> are ANSI C.
|
||||
<code>sinf</code> and <code>cosf</code> are extensions.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>sinh - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="sin.html#sin" title="sin">
|
||||
<link rel="next" href="sqrt.html#sqrt" title="sqrt">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="sinh"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="sqrt.html#sqrt">sqrt</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="sin.html#sin">sin</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.53 <code>sinh</code>, <code>sinhf</code>—hyperbolic sine</h3>
|
||||
|
||||
<p><a name="index-sinh-144"></a><a name="index-sinhf-145"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double sinh(double <var>x</var>);
|
||||
float sinhf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>sinh</code> computes the hyperbolic sine of the argument <var>x</var>.
|
||||
Angles are specified in radians. <code>sinh</code>(<var>x</var>) is defined as
|
||||
<pre class="smallexample"> (exp(<var>x</var>) - exp(-<var>x</var>))/2
|
||||
</pre>
|
||||
<p><code>sinhf</code> is identical, save that it takes and returns <code>float</code> values.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The hyperbolic sine of <var>x</var> is returned.
|
||||
|
||||
<p>When the correct result is too large to be representable (an
|
||||
overflow), <code>sinh</code> returns <code>HUGE_VAL</code> with the
|
||||
appropriate sign, and sets the global value <code>errno</code> to
|
||||
<code>ERANGE</code>.
|
||||
|
||||
<p>You can modify error handling for these functions with <code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>sinh</code> is ANSI C.
|
||||
<code>sinhf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>sqrt - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="sinh.html#sinh" title="sinh">
|
||||
<link rel="next" href="tan.html#tan" title="tan">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="sqrt"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="tan.html#tan">tan</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="sinh.html#sinh">sinh</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.54 <code>sqrt</code>, <code>sqrtf</code>—positive square root</h3>
|
||||
|
||||
<p><a name="index-sqrt-146"></a><a name="index-sqrtf-147"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double sqrt(double <var>x</var>);
|
||||
float sqrtf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>sqrt</code> computes the positive square root of the argument.
|
||||
You can modify error handling for this function with
|
||||
<code>matherr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
On success, the square root is returned. If <var>x</var> is real and
|
||||
positive, then the result is positive. If <var>x</var> is real and
|
||||
negative, the global value <code>errno</code> is set to <code>EDOM</code> (domain error).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>sqrt</code> is ANSI C. <code>sqrtf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>tan - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="sqrt.html#sqrt" title="sqrt">
|
||||
<link rel="next" href="tanh.html#tanh" title="tanh">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="tan"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="tanh.html#tanh">tanh</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="sqrt.html#sqrt">sqrt</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.55 <code>tan</code>, <code>tanf</code>—tangent</h3>
|
||||
|
||||
<p><a name="index-tan-148"></a><a name="index-tanf-149"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double tan(double <var>x</var>);
|
||||
float tanf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>tan</code> computes the tangent of the argument <var>x</var>.
|
||||
Angles are specified in radians.
|
||||
|
||||
<p><code>tanf</code> is identical, save that it takes and returns <code>float</code> values.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The tangent of <var>x</var> is returned.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>tan</code> is ANSI. <code>tanf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>tanh - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="tan.html#tan" title="tan">
|
||||
<link rel="next" href="trunc.html#trunc" title="trunc">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="tanh"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="trunc.html#trunc">trunc</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="tan.html#tan">tan</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.56 <code>tanh</code>, <code>tanhf</code>—hyperbolic tangent</h3>
|
||||
|
||||
<p><a name="index-tanh-150"></a><a name="index-tanhf-151"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double tanh(double <var>x</var>);
|
||||
float tanhf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
|
||||
<p><code>tanh</code> computes the hyperbolic tangent of
|
||||
the argument <var>x</var>. Angles are specified in radians.
|
||||
|
||||
<p><code>tanh(</code><var>x</var><code>)</code> is defined as
|
||||
<pre class="smallexample"> sinh(<var>x</var>)/cosh(<var>x</var>)
|
||||
</pre>
|
||||
<p><code>tanhf</code> is identical, save that it takes and returns <code>float</code> values.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The hyperbolic tangent of <var>x</var> is returned.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>tanh</code> is ANSI C. <code>tanhf</code> is an extension.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>trunc - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="prev" href="tanh.html#tanh" title="tanh">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="trunc"></a>
|
||||
<p>
|
||||
Previous: <a rel="previous" accesskey="p" href="tanh.html#tanh">tanh</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.57 <code>trunc</code>, <code>truncf</code>–round to integer, towards zero</h3>
|
||||
|
||||
<p><a name="index-trunc-152"></a><a name="index-truncf-153"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <math.h>
|
||||
double trunc(double <var>x</var>);
|
||||
float truncf(float <var>x</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>trunc</code> functions round their argument to the integer value, in
|
||||
floating format, nearest to but no larger in magnitude than the
|
||||
argument, regardless of the current rounding direction. (While the
|
||||
"inexact" floating-point exception behavior is unspecified by the C
|
||||
standard, the <code>trunc</code> functions are written so that "inexact" is not
|
||||
raised if the result does not equal the argument, which behavior is as
|
||||
recommended by IEEE 754 for its related functions.)
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<var>x</var> truncated to an integral value.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C, POSIX
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>version - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.13">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Math.html#Math" title="Math">
|
||||
<link rel="next" href="acos.html#acos" title="acos">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
<link rel="stylesheet" type="text/css" href="../cs.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<a name="version"></a>
|
||||
<p>
|
||||
Next: <a rel="next" accesskey="n" href="acos.html#acos">acos</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Math.html#Math">Math</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">1.1 Error Handling</h3>
|
||||
|
||||
<p>There are four different versions of the math library routines: IEEE,
|
||||
POSIX, X/Open, or SVID. The version may be selected at runtime by
|
||||
setting the global variable <code>_LIB_VERSION</code>, defined in
|
||||
<samp><span class="file">math.h</span></samp>. It may be set to one of the following constants defined
|
||||
in <samp><span class="file">math.h</span></samp>: <code>_IEEE_</code>, <code>_POSIX_</code>, <code>_XOPEN_</code>, or
|
||||
<code>_SVID_</code>. The <code>_LIB_VERSION</code> variable is not specific to any
|
||||
thread, and changing it will affect all threads.
|
||||
|
||||
<p>The versions of the library differ only in how errors are handled.
|
||||
|
||||
<p>In IEEE mode, the <code>matherr</code> function is never called, no warning
|
||||
messages are printed, and <code>errno</code> is never set.
|
||||
|
||||
<p>In POSIX mode, <code>errno</code> is set correctly, but the <code>matherr</code>
|
||||
function is never called and no warning messages are printed.
|
||||
|
||||
<p>In X/Open mode, <code>errno</code> is set correctly, and <code>matherr</code> is
|
||||
called, but warning message are not printed.
|
||||
|
||||
<p>In SVID mode, functions which overflow return 3.40282346638528860e+38,
|
||||
the maximum single-precision floating-point value, rather than infinity.
|
||||
Also, <code>errno</code> is set correctly, <code>matherr</code> is called, and, if
|
||||
<code>matherr</code> returns 0, warning messages are printed for some errors.
|
||||
For example, by default ‘<samp><span class="samp">log(-1.0)</span></samp>’ writes this message on standard
|
||||
error output:
|
||||
|
||||
<pre class="example"> log: DOMAIN error
|
||||
</pre>
|
||||
<p>The library is set to X/Open mode by default.
|
||||
|
||||
<p>The aforementioned error reporting is the supported Newlib libm error
|
||||
handling method. However, the majority of the functions are written
|
||||
so as to produce the floating-point exceptions (e.g. "invalid",
|
||||
"divide-by-zero") as required by the C and POSIX standards, for
|
||||
floating-point implementations that support them. Newlib does not provide
|
||||
the floating-point exception access routines defined in the standards
|
||||
for fenv.h, though, which is why they are considered unsupported. It is
|
||||
mentioned in case you have separately-provided access routines so that
|
||||
you are aware that they can be caused.
|
||||
|
||||
<h3 class="section">1.2 Standards Compliance And Portability</h3>
|
||||
|
||||
<p>Most of the individual function descriptions describe the standards to which
|
||||
each function complies. However, these descriptions are mostly out of date,
|
||||
having been written before C99 was released. One of these days we'll get
|
||||
around to updating the rest of them. (If you'd like to help, please let us
|
||||
know.)
|
||||
|
||||
<p>“C99” refers to ISO/IEC 9899:1999, “Programming languages–C”.
|
||||
“POSIX” refers to IEEE Standard 1003.1. POSIX® is a
|
||||
registered trademark of The IEEE.
|
||||
|
||||
<!-- To sort the include list easily, keep the indentation right because want to -->
|
||||
<!-- skip the s_|w_ at the start of most-but not all-of the file names. -->
|
||||
<!-- (e.g., isgreater.def does not have a leading s nor w.) Then, sort -->
|
||||
<!-- based on the column. For example: "sort -t@ -k3.17" -->
|
||||
<!-- A few hand-edits might be appropriate after a sort, although not necessary -->
|
||||
<!-- and are a nuisance as ought to be kept in sync with menu list above: -->
|
||||
<!-- atan2 after atan, exp2 after exp, log first in log list, and w_j0 to place -->
|
||||
<!-- to reflect function name of Bessel (as opposed to j; e.g. after atanh, -->
|
||||
<!-- before cbrt). -->
|
||||
</body></html>
|
||||
|
||||
Reference in New Issue
Block a user