Home >>C Math Functions
Various mathematical functions are defines in the math.h header. All mathematical functions in this library return double as a result and take double as an argument.
In math.h header Following are the functions defined -:
Function | Description |
---|---|
acos() | It returns the arc cosine of x in radians. |
asin() | It returns the arc sine of x in radians. |
atan() | It returns the arc tangent of x in radians. |
atan2() | It returns the arc tangent in radians of y/x. |
cos() | It returns the cosine of a radian angle x. |
cosh() | It returns the hyperbolic cosine of x. |
sin() | It returns the sine of a radian angle x. |
sinh() | It returns the hyperbolic sine of x. |
tanh() | It returns the hyperbolic tangent of x. |
exp() | It returns the value of e raised to the xth power. |
frexp() | It returns the value is x = mantissa * 2 ^ exponent. |
ldexp() | It returns x multiplied by 2 raised to the power of exponent. |
log() | It returns the natural logarithm (base-e logarithm) of x. |
log10() | It returns the common logarithm (base-10 logarithm) of x. |
modf() | It returns the value of the fraction component and sets integer to the integer component. |
pow() | It returns x raised to the power of y. |
sqrt() | It returns the square root of x. |
ceil() | It returns the smallest integer value greater than or equal to x. |
fabs() | It returns the absolute value of x. |
floor() | It returns the largest integer value less than or equal to x. |
fmod() | It returns the remainder of x divided by y. |