math.h
From Wikipedia, the free encyclopedia
C Standard Library headers |
math.h is a header file in the standard library of C programming language designed for basic mathematical operations. Most of the functions involve the use of floating point numbers. C++ also implements these functions for compatibility reasons and declares them in the header cmath
.
All functions that take or return an angle work in radians.
[edit] Pre-C99 member functions
Name | Description |
---|---|
acos |
arccosine |
asin |
arcsine |
atan |
arctangent |
atan2 |
two-parameter arctangent |
ceil |
smallest integer not less than parameter |
cos |
cosine |
cosh |
hyperbolic cosine |
exp |
exponential function |
fabs |
absolute value |
floor |
largest integer not greater than parameter |
fmod |
floating point remainder |
frexp |
fraction and power of 2. |
ldexp |
scale exponent of floating-point value |
log |
natural logarithm |
log10 |
base-10 logarithm |
modf (x,p) |
returns fractional part of x and stores integral part where pointer p points to |
pow(x,y) |
compute a value taken to an exponent, xy |
sin |
sine |
sinh |
hyperbolic sine |
sqrt |
square root |
tan |
tangent |
tanh |
hyperbolic tangent |
[edit] Extra links
- The Single UNIX® Specification, Issue 6 from The Open Group : mathematical declarations – Base Definitions Reference,
- Dinkumware math.h reference, a reference of all
math.h
functions