C mathematical functions

Math.h is a header file in the standard C library, the programming language C. It was developed for mathematical functions. The programming language C uses the functions also to ensure compatibility from C to C , and declared it in the header file cmath ( there without the file name extension ". H " is used ).

All functions that read an angle or issue, work with radians. Most functions work with floating point numbers. Mathematical functions with integer values ​​(Integer) work as abv, labs, div or ldiv are instead represented in the stdlib.h header file.

Functions to C95

The standards up to and including C95, the following functions were declared.

C99 functions

With the standard C99 math.h was enhanced with the following features.

Example

# include # include   int main (void ) {      float a = 5, b = 4, c;      c = pow ( a, b);      printf ( "% f % f % f high \ n", a, b, c);      return 0; } Web Links

  • Description on cplusplus.com (English)
  • Documentation of math.h on dinkumware.com ( version of 21 February 2010 at the Internet Archive )
  • C ( programming language)
195105
de