math.h
This holds many of the more useful mathematical functions.
- double sin(double x)
- returns the sine of x (where x is in radians).
- double cos(double x)
- returns the cosine of x (where x is in radians).
- double tan(double x)
- returns the tangent of x (where x is in radians).
- double asin(double x)
- returns the arcsine of x in radians between -pi/2 and pi/2,
for x between -1 and 1.
- double acos(double x)
- returns the arccosine of x in radians between 0 and pi,
for x between -1 and 1.
- double atan(double x)
- returns the arctangent of x in radians between -pi/2 and
pi/2.
- double atan2(double y, double x)
- returns the angle (in radians between -pi and pi)
of a line with rise y for each run of x.
- double sinh(double x)
- returns the hyperbolic sine of x.
- double cosh(double x)
- returns the hyperbolic cosine of x.
- double tanh(double x)
- returns the hyperbolic tangent of x.
- double exp(double x)
- returns the ex (the exponential
function, with e around 2.71828).
- double log(double x)
- returns the natural logarithm of x.
- double log10(double x)
- returns the base-10 logarithm of x.
- double pow(double x, double y)
- returns xy.
- double sqrt(double x)
- returns the square root of x.
- double ceil(double x)
- returns x rounded up to the next integer (the smallest
integer that is at least x).
- double floor(double x)
- returns x rounded down to an integer (the largest integer
that is at most x).
- double fabs(double x)
- returns the absolute value for x.
- double fmod(double x, double y)
- returns a number r between -y and y so
that x = i*y + r for some
integer i.