Non-Confidential | PDF version | ARM DUI0472M | ||

| ||||

Home > Compiler Coding Practices > Additional <math.h> library functions in C99 |

C99 supports additional macros, types, and functions in the standard header `<math.h>`

that are not found in the corresponding C90 standard header.

New macros found in C99 that are not found in C90 include:

INFINITY // positive infinity NAN // IEEE not-a-number

New generic function macros found in C99 that are not found in C90 include:

#define isinf(x) // non-zero only if x is positive or negative infinity #define isnan(x) // non-zero only if x is NaN #define isless(x, y) // 1 only if x < y and x and y are not NaN, and 0 otherwise #define isunordered(x, y) // 1 only if either x or y is NaN, and 0 otherwise

New mathematical functions found in C99 that are not found in C90 include:

double acosh(double x); // hyperbolic arccosine of x double asinh(double x); // hyperbolic arcsine of x double atanh(double x); // hyperbolic arctangent of x double erf(double x); // returns the error function of x double round(double x); // returns x rounded to the nearest integer double tgamma(double x); // returns the gamma function of x

C99 supports the new mathematical functions for all real floating-point types.

Single precision versions of all existing `<math.h>`

functions are
also supported.