Datasheet

Floating-point Support
5-26 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
5.4.5 One less than exp(x) (expm1)
double expm1(double x);
This function computes e to the power x, minus one. It is better to use
expm1(x)
than
exp(x)-1
if x is very near to zero, because
expm1
returns a more accurate value.
5.4.6 Determine if a number is finite (finite)
int finite(double x);
This function returns 1 if x is finite, and 0 if x is infinite or NaN. It does not cause any
errors or exceptions.
5.4.7 Gamma function (gamma, gamma_r)
double gamma(double x);
double gamma_r(double x, int *);
These functions both compute the logarithm of the gamma function. They are synonyms
for
lgamma
and
lgamma_r
(see The logarithm of the gamma function (lgamma, lgamma_r)
on page 5-27).
Note
Despite their names, these functions compute the logarithm of the gamma function, not
the gamma function itself.
5.4.8 Hypotenuse function (hypot)
double hypot(double x, double y);
This function computes the length of the hypotenuse of a right-angled triangle whose
other two sides have length x and y. Equivalently, it computes the length of the vector
(x,y) in Cartesian coordinates. Using
hypot(x,y)
is better than
sqrt(x*x+y*y)
because
some values of x and y could cause x * x + y * y to overflow even though its square root
would not.
hypot
returns an
ERANGE
error when the result does not fit in a
double
.