📄 mathalib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/mathALib.html - generated by refgen from ../mc68k/math/mathALib.s --> <title> mathALib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference : OS Libraries</i></a></p></blockquote><h1>mathALib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>mathALib</strong> - C interface library to high-level math functions </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./mathALib.html#acos">acos</a>( )</b> - compute an arc cosine (ANSI)<br><b><a href="./mathALib.html#asin">asin</a>( )</b> - compute an arc sine (ANSI)<br><b><a href="./mathALib.html#atan">atan</a>( )</b> - compute an arc tangent (ANSI)<br><b><a href="./mathALib.html#atan2">atan2</a>( )</b> - compute the arc tangent of y/x (ANSI)<br><b><a href="./mathALib.html#cbrt">cbrt</a>( )</b> - compute a cube root<br><b><a href="./mathALib.html#ceil">ceil</a>( )</b> - compute the smallest integer greater than or equal to a specified value (ANSI)<br><b><a href="./mathALib.html#cos">cos</a>( )</b> - compute a cosine (ANSI)<br><b><a href="./mathALib.html#cosh">cosh</a>( )</b> - compute a hyperbolic cosine (ANSI)<br><b><a href="./mathALib.html#exp">exp</a>( )</b> - compute an exponential value (ANSI)<br><b><a href="./mathALib.html#fabs">fabs</a>( )</b> - compute an absolute value (ANSI)<br><b><a href="./mathALib.html#floor">floor</a>( )</b> - compute the largest integer less than or equal to a specified value (ANSI)<br><b><a href="./mathALib.html#fmod">fmod</a>( )</b> - compute the remainder of x/y (ANSI)<br><b><a href="./mathALib.html#infinity">infinity</a>( )</b> - return a very large double<br><b><a href="./mathALib.html#irint">irint</a>( )</b> - convert a double-precision value to an integer<br><b><a href="./mathALib.html#iround">iround</a>( )</b> - round a number to the nearest integer<br><b><a href="./mathALib.html#log">log</a>( )</b> - compute a natural logarithm (ANSI)<br><b><a href="./mathALib.html#log10">log10</a>( )</b> - compute a base-10 logarithm (ANSI)<br><b><a href="./mathALib.html#log2">log2</a>( )</b> - compute a base-2 logarithm<br><b><a href="./mathALib.html#pow">pow</a>( )</b> - compute the value of a number raised to a specified power (ANSI)<br><b><a href="./mathALib.html#round">round</a>( )</b> - round a number to the nearest integer<br><b><a href="./mathALib.html#sin">sin</a>( )</b> - compute a sine (ANSI)<br><b><a href="./mathALib.html#sincos">sincos</a>( )</b> - compute both a sine and cosine<br><b><a href="./mathALib.html#sinh">sinh</a>( )</b> - compute a hyperbolic sine (ANSI)<br><b><a href="./mathALib.html#sqrt">sqrt</a>( )</b> - compute a non-negative square root (ANSI)<br><b><a href="./mathALib.html#tan">tan</a>( )</b> - compute a tangent (ANSI)<br><b><a href="./mathALib.html#tanh">tanh</a>( )</b> - compute a hyperbolic tangent (ANSI)<br><b><a href="./mathALib.html#trunc">trunc</a>( )</b> - truncate to integer<br><b><a href="./mathALib.html#acosf">acosf</a>( )</b> - compute an arc cosine (ANSI)<br><b><a href="./mathALib.html#asinf">asinf</a>( )</b> - compute an arc sine (ANSI)<br><b><a href="./mathALib.html#atanf">atanf</a>( )</b> - compute an arc tangent (ANSI)<br><b><a href="./mathALib.html#atan2f">atan2f</a>( )</b> - compute the arc tangent of y/x (ANSI)<br><b><a href="./mathALib.html#cbrtf">cbrtf</a>( )</b> - compute a cube root<br><b><a href="./mathALib.html#ceilf">ceilf</a>( )</b> - compute the smallest integer greater than or equal to a specified value (ANSI)<br><b><a href="./mathALib.html#cosf">cosf</a>( )</b> - compute a cosine (ANSI)<br><b><a href="./mathALib.html#coshf">coshf</a>( )</b> - compute a hyperbolic cosine (ANSI)<br><b><a href="./mathALib.html#expf">expf</a>( )</b> - compute an exponential value (ANSI)<br><b><a href="./mathALib.html#fabsf">fabsf</a>( )</b> - compute an absolute value (ANSI)<br><b><a href="./mathALib.html#floorf">floorf</a>( )</b> - compute the largest integer less than or equal to a specified value (ANSI)<br><b><a href="./mathALib.html#fmodf">fmodf</a>( )</b> - compute the remainder of x/y (ANSI)<br><b><a href="./mathALib.html#infinityf">infinityf</a>( )</b> - return a very large float<br><b><a href="./mathALib.html#irintf">irintf</a>( )</b> - convert a single-precision value to an integer<br><b><a href="./mathALib.html#iroundf">iroundf</a>( )</b> - round a number to the nearest integer<br><b><a href="./mathALib.html#logf">logf</a>( )</b> - compute a natural logarithm (ANSI)<br><b><a href="./mathALib.html#log10f">log10f</a>( )</b> - compute a base-10 logarithm (ANSI)<br><b><a href="./mathALib.html#log2f">log2f</a>( )</b> - compute a base-2 logarithm<br><b><a href="./mathALib.html#powf">powf</a>( )</b> - compute the value of a number raised to a specified power (ANSI)<br><b><a href="./mathALib.html#roundf">roundf</a>( )</b> - round a number to the nearest integer<br><b><a href="./mathALib.html#sinf">sinf</a>( )</b> - compute a sine (ANSI)<br><b><a href="./mathALib.html#sincosf">sincosf</a>( )</b> - compute both a sine and cosine<br><b><a href="./mathALib.html#sinhf">sinhf</a>( )</b> - compute a hyperbolic sine (ANSI)<br><b><a href="./mathALib.html#sqrtf">sqrtf</a>( )</b> - compute a non-negative square root (ANSI)<br><b><a href="./mathALib.html#tanf">tanf</a>( )</b> - compute a tangent (ANSI)<br><b><a href="./mathALib.html#tanhf">tanhf</a>( )</b> - compute a hyperbolic tangent (ANSI)<br><b><a href="./mathALib.html#truncf">truncf</a>( )</b> - truncate to integer<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides a C interface to high-level floating-point mathfunctions, which can use either a hardware floating-point unit or asoftware floating-point emulation library. The appropriate routine iscalled based on whether <b><a href="./mathHardLib.html#mathHardInit">mathHardInit</a>( )</b> or <b><a href="./mathSoftLib.html#mathSoftInit">mathSoftInit</a>( )</b> or both havebeen called to initialize the interface.<p>All angle-related parameters are expressed in radians. All functions inthis library with names corresponding to ANSI C specifications are ANSIcompatible.<p></blockquote><h4>WARNING</h4><blockquote><p>Not all functions in this library are available on all architectures. For information on available math functions, consult the VxWorks architecture supplement for your processor.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><p><b><a href="./ansiMath.html#top">ansiMath</a></b>, <b><a href="./fppLib.html#top">fppLib</a></b>, <b><a href="./floatLib.html#top">floatLib</a></b>, <b><a href="./mathHardLib.html#top">mathHardLib</a></b>, <b><a href="./mathSoftLib.html#top">mathSoftLib</a></b>, the various<i>Architecture Supplements, </i>Kernighan & Ritchie:<i>The C Programming Language, 2nd Edition </i><hr><a name="acos"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>acos( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>acos( )</strong> - compute an arc cosine (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double acos ( double x /* angle in radians */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p>The double-precision arc cosine of <i>x</i> in the range 0.0to pi radians.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, Kernighan & Ritchie, <i>The C Programming Language, 2nd Edition</i><hr><a name="asin"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>asin( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>asin( )</strong> - compute an arc sine (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double asin ( double x /* angle in radians */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p>The double-precision arc sine of <i>x</i> in the range-pi/2 to pi/2 radians.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, Kernighan & Ritchie:<i>The C Programming Language, 2nd Edition</i><hr><a name="atan"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>atan( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>atan( )</strong> - compute an arc tangent (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double atan ( double x /* angle in radians */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p>The double-precision arc tangent of <i>x</i> in the range -pi/2 to pi/2.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, Kernighan & Ritchie:<i>The C Programming Language, 2nd Edition</i><hr><a name="atan2"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>atan2( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>atan2( )</strong> - compute the arc tangent of y/x (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double atan2 ( double y, /* numerator */ double x /* denominator */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p><p>The double-precision arc tangent of <i>y</i>/<i>x</i> in the range -pi to pi.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, Kernighan & Ritchie:<i>The C Programming Language, 2nd Edition</i><hr><a name="cbrt"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>cbrt( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cbrt( )</strong> - compute a cube root</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double cbrt ( double x /* value to compute the cube root of */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p>This routine returns the cube root of <i>x</i> in double precision.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p>The double-precision cube root of <i>x</i>.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b><hr><a name="ceil"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ceil( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ceil( )</strong> - compute the smallest integer greater than or equal to a specified value (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double ceil ( double v /* value to return the ceiling of */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p>Performs a round-to-positive-infinity.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p><p>The smallest integral value greater than or equal to <i>v</i>,represented in double precision.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, Kernighan & Ritchie:<i>The C Programming Language, 2nd Edition</i><hr><a name="cos"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>cos( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cos( )</strong> - compute a cosine (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double cos ( double x /* angle in radians */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p>The double-precision cosine of <i>x</i>.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, Kernighan & Ritchie:<i>The C Programming Language, 2nd Edition</i><hr><a name="cosh"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>cosh( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cosh( )</strong> - compute a hyperbolic cosine (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double cosh ( double x /* angle in radians */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p><p>The double-precision hyperbolic cosine of <i>x</i> if the parameter is greaterthan 1.0, or NaN if the parameter is less than 1.0.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, Kernighan & Ritchie:<i>The C Programming Language, 2nd Edition</i><hr><a name="exp"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>exp( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>exp( )</strong> - compute an exponential value (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double exp ( double x /* exponent */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p>This routine returns the exponential value of <i>x</i> -- the inverse naturallogarithm (e ** <i>x</i>) -- in double precision.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p><p>The double-precision exponential value of <i>x</i>.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, Kernighan & Ritchie:<i>The C Programming Language, 2nd Edition</i><hr><a name="fabs"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>fabs( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>fabs( )</strong> - compute an absolute value (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double fabs ( double v /* number to return the absolute value of */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p>The double-precision absolute value of <i>v</i>.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, Kernighan & Ritchie:<i>The C Programming Language, 2nd Edition</i><hr><a name="floor"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>floor( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>floor( )</strong> - compute the largest integer less than or equal to a specified value (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>double floor ( double v /* value to return the floor of */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p><p>Performs a round-to-negative-infinity.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p><p>The largest integral value less than or equal to <i>v</i>,in double precision.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, Kernighan & Ritchie:<i>The C Programming Language, 2nd Edition</i><hr><a name="fmod"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>fmod( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>fmod( )</strong> - compute the remainder of x/y (ANSI)</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -