Header File <math.h>

The header file provides the following functionality:

Functions

double sin( double x );
double cos( double x );
double tan( double x );
double asin( double x );
double acos( double x );
double atan( double x );
double atan2( double y, double x );
double sinh( double x );
double cosh( double x );
double tanh( double x );
double exp( double x );
double exp2( double x );
double log( double x );
double log10( double x );
double log2( double x );
double pow( double x, double y );
double sqrt( double x );
double ceil( double x );
double floor( double x );
double round( double x );
double trunc( double x );
double fabs( double x );
double ldexp( double x, int n );

float sinf( float x );
float cosf( float x );
float tanf( float x );
float asinf( float x );
float acosf( float x );
float atanf( float x );
float atan2f( float y, float x );
float sinhf( float x );
float coshf( float x );
float tanhf( float x );
float expf( float x );
float exp2f( float x );
float logf( float x );
float log10f( float x );
float log2f( float x );
float powf( float x, float y );
float sqrtf( float x );
float ceilf( float x );
float floorf( float x );
float roundf( float x );
float truncf( float x );
float fabsf( float x );
float ldexpf( float x, int n );

 
Limitations

The range of values supported may not follow the standard. No range- or error checking is performed.

Missing

Functions frexp, modf and fmod.

Macro HUGE_VAL.

Additions

The float versions are not part of the C89 standard, but are in the C99 standard and libc.lib.

exp2, log2 and trunc are from the C99 standard.

Notes

-