Datasheet

Floating-point Support
5-24 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
5.4 The math library, mathlib
Trigonometric functions in mathlib use range reduction to bring large arguments within
the range 0 to 2π. ARM provides two different range reduction functions. One is
accurate to one unit in the last place for any input values, but is larger and slower than
the other. The other is reliable enough for almost all purposes and is faster and smaller.
The fast and small range reducer is used by default. To select the more accurate one, use
either:
#pragma import
(__use_accurate_range_reduction)
from C
IMPORT
__use_accurate_range_reduction
from assembly language.
In addition to the functions defined by the ANSI C standard, mathlib provides the
following functions:
Inverse hyperbolic functions (acosh, asinh, atanh) on page 5-25
Cube root (cbrt) on page 5-25
Copy sign (copysign) on page 5-25
Error functions (erf, erfc) on page 5-25
One less than exp(x) (expm1) on page 5-26
Determine if a number is finite (finite) on page 5-26
Gamma function (gamma, gamma_r) on page 5-26
Hypotenuse function (hypot) on page 5-26
Return the exponent of a number (ilogb) on page 5-27
Determine if a number is a NaN (isnan) on page 5-27
Bessel functions of the first kind (j0, j1, jn) on page 5-27
The logarithm of the gamma function (lgamma, lgamma_r) on page 5-27
Logarithm of one more than x (log1p) on page 5-28
Return the exponent of a number (logb) on page 5-28
Return the next representable number (nextafter) on page 5-28
IEEE 754 remainder function (remainder) on page 5-28
IEEE round-to-integer operation (rint) on page 5-28
Scale a number by a power of two (scalb, scalbn) on page 5-29
Return the fraction part of a number (significand) on page 5-29
Bessel functions of the second kind (y0, y1, yn) on page 5-29.