📄 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.html"><i>VxWorks Reference Manual : 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><i><a href="./mathALib.html#acos">acos</a></i>( )</b> - compute an arc cosine (ANSI)<br><b><i><a href="./mathALib.html#asin">asin</a></i>( )</b> - compute an arc sine (ANSI)<br><b><i><a href="./mathALib.html#atan">atan</a></i>( )</b> - compute an arc tangent (ANSI)<br><b><i><a href="./mathALib.html#atan2">atan2</a></i>( )</b> - compute the arc tangent of y/x (ANSI)<br><b><i><a href="./mathALib.html#cbrt">cbrt</a></i>( )</b> - compute a cube root<br><b><i><a href="./mathALib.html#ceil">ceil</a></i>( )</b> - compute the smallest integer greater than or equal to a specified value (ANSI)<br><b><i><a href="./mathALib.html#cos">cos</a></i>( )</b> - compute a cosine (ANSI)<br><b><i><a href="./mathALib.html#cosh">cosh</a></i>( )</b> - compute a hyperbolic cosine (ANSI)<br><b><i><a href="./mathALib.html#exp">exp</a></i>( )</b> - compute an exponential value (ANSI)<br><b><i><a href="./mathALib.html#fabs">fabs</a></i>( )</b> - compute an absolute value (ANSI)<br><b><i><a href="./mathALib.html#floor">floor</a></i>( )</b> - compute the largest integer less than or equal to a specified value (ANSI)<br><b><i><a href="./mathALib.html#fmod">fmod</a></i>( )</b> - compute the remainder of x/y (ANSI)<br><b><i><a href="./mathALib.html#infinity">infinity</a></i>( )</b> - return a very large double<br><b><i><a href="./mathALib.html#irint">irint</a></i>( )</b> - convert a double-precision value to an integer<br><b><i><a href="./mathALib.html#iround">iround</a></i>( )</b> - round a number to the nearest integer<br><b><i><a href="./mathALib.html#log">log</a></i>( )</b> - compute a natural logarithm (ANSI)<br><b><i><a href="./mathALib.html#log10">log10</a></i>( )</b> - compute a base-10 logarithm (ANSI)<br><b><i><a href="./mathALib.html#log2">log2</a></i>( )</b> - compute a base-2 logarithm<br><b><i><a href="./mathALib.html#pow">pow</a></i>( )</b> - compute the value of a number raised to a specified power (ANSI)<br><b><i><a href="./mathALib.html#round">round</a></i>( )</b> - round a number to the nearest integer<br><b><i><a href="./mathALib.html#sin">sin</a></i>( )</b> - compute a sine (ANSI)<br><b><i><a href="./mathALib.html#sincos">sincos</a></i>( )</b> - compute both a sine and cosine<br><b><i><a href="./mathALib.html#sinh">sinh</a></i>( )</b> - compute a hyperbolic sine (ANSI)<br><b><i><a href="./mathALib.html#sqrt">sqrt</a></i>( )</b> - compute a non-negative square root (ANSI)<br><b><i><a href="./mathALib.html#tan">tan</a></i>( )</b> - compute a tangent (ANSI)<br><b><i><a href="./mathALib.html#tanh">tanh</a></i>( )</b> - compute a hyperbolic tangent (ANSI)<br><b><i><a href="./mathALib.html#trunc">trunc</a></i>( )</b> - truncate to integer<br><b><i><a href="./mathALib.html#acosf">acosf</a></i>( )</b> - compute an arc cosine (ANSI)<br><b><i><a href="./mathALib.html#asinf">asinf</a></i>( )</b> - compute an arc sine (ANSI)<br><b><i><a href="./mathALib.html#atanf">atanf</a></i>( )</b> - compute an arc tangent (ANSI)<br><b><i><a href="./mathALib.html#atan2f">atan2f</a></i>( )</b> - compute the arc tangent of y/x (ANSI)<br><b><i><a href="./mathALib.html#cbrtf">cbrtf</a></i>( )</b> - compute a cube root<br><b><i><a href="./mathALib.html#ceilf">ceilf</a></i>( )</b> - compute the smallest integer greater than or equal to a specified value (ANSI)<br><b><i><a href="./mathALib.html#cosf">cosf</a></i>( )</b> - compute a cosine (ANSI)<br><b><i><a href="./mathALib.html#coshf">coshf</a></i>( )</b> - compute a hyperbolic cosine (ANSI)<br><b><i><a href="./mathALib.html#expf">expf</a></i>( )</b> - compute an exponential value (ANSI)<br><b><i><a href="./mathALib.html#fabsf">fabsf</a></i>( )</b> - compute an absolute value (ANSI)<br><b><i><a href="./mathALib.html#floorf">floorf</a></i>( )</b> - compute the largest integer less than or equal to a specified value (ANSI)<br><b><i><a href="./mathALib.html#fmodf">fmodf</a></i>( )</b> - compute the remainder of x/y (ANSI)<br><b><i><a href="./mathALib.html#infinityf">infinityf</a></i>( )</b> - return a very large float<br><b><i><a href="./mathALib.html#irintf">irintf</a></i>( )</b> - convert a single-precision value to an integer<br><b><i><a href="./mathALib.html#iroundf">iroundf</a></i>( )</b> - round a number to the nearest integer<br><b><i><a href="./mathALib.html#logf">logf</a></i>( )</b> - compute a natural logarithm (ANSI)<br><b><i><a href="./mathALib.html#log10f">log10f</a></i>( )</b> - compute a base-10 logarithm (ANSI)<br><b><i><a href="./mathALib.html#log2f">log2f</a></i>( )</b> - compute a base-2 logarithm<br><b><i><a href="./mathALib.html#powf">powf</a></i>( )</b> - compute the value of a number raised to a specified power (ANSI)<br><b><i><a href="./mathALib.html#roundf">roundf</a></i>( )</b> - round a number to the nearest integer<br><b><i><a href="./mathALib.html#sinf">sinf</a></i>( )</b> - compute a sine (ANSI)<br><b><i><a href="./mathALib.html#sincosf">sincosf</a></i>( )</b> - compute both a sine and cosine<br><b><i><a href="./mathALib.html#sinhf">sinhf</a></i>( )</b> - compute a hyperbolic sine (ANSI)<br><b><i><a href="./mathALib.html#sqrtf">sqrtf</a></i>( )</b> - compute a non-negative square root (ANSI)<br><b><i><a href="./mathALib.html#tanf">tanf</a></i>( )</b> - compute a tangent (ANSI)<br><b><i><a href="./mathALib.html#tanhf">tanhf</a></i>( )</b> - compute a hyperbolic tangent (ANSI)<br><b><i><a href="./mathALib.html#truncf">truncf</a></i>( )</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><i><a href="./mathHardLib.html#mathHardInit">mathHardInit</a></i>( )</b> or <b><i><a href="./mathSoftLib.html#mathSoftInit">mathSoftInit</a></i>( )</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.The architecture-specific appendices of the<i>VxWorks Programmer's Guide </i>list any math functions that are not available.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>math.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./mathALib.html#top">mathALib</a></b>, ansiMath, <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>, .brKernighan & Ritchie:<i>The C Programming Language, 2nd</i>Edition, .pGArchitecture-specific Appendices<hr><a name="acos"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>acos</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>acos</i>( )</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></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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>asin</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>asin</i>( )</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></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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>atan</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>atan</i>( )</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></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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>atan2</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>atan2</i>( )</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></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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>cbrt</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>cbrt</i>( )</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>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>.</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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ceil</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ceil</i>( )</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>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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>cos</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>cos</i>( )</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></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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>cosh</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>cosh</i>( )</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></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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>exp</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>exp</i>( )</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>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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>fabs</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>fabs</i>( )</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></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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>floor</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>floor</i>( )</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>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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -