353
Double-precision math
function
Single-precision math
function
double atan2(double y,
double x);
float atan2f(float y, float
x);
Inverse tangent value of
parameter (y/x)
Return the smallest double
integer which is greater or
equal with parameter x
Hyperbolic cosine function,
cosh(x)=(e^x+e^(-x))/2
Exponent (e^x) of a nature data
Absolute value of parameter x
Return the largest double
integer which is smaller or
equals with x
double fmod(double x,
double y);
float fmodf(float x, float y);
If y is not zero, return the
reminder of floating x/y
double frexp(double val, int
_far *exp);
float frexpf(float val, int
_far *exp);
Break floating data x to be
mantissa and exponent x =
m*2^exp, return the mantissa
of m, save the logarithm into
exp.
double ldexp(double x, int
exp);
float ldexpf(float x, int
exp);
X multiply the (two to the
power of n) is x*2^n.
double modf(double val,
double *pd);
float modff(float val, float
*pd);
Break floating data X to be
integral part and decimal part,
return the decimal part, save
the integral part into parameter
ip.
double pow(double x, double
y);
float powf(float x, float y);
Power value of parameter y
(x^y)
Hyperbolic sine function,
sinh(x)=(e^x-e^(-x))/2
Square root of parameter X
hyperbolic tangent function
tanh(x)=(e^x-e^(-x))/(e^2+e^(-
x))
The using method of the functions in the table:
float asinf(float x);
float asinf: float means the return value is float format;
float x: float means the function formal parameter is float format. In actual using, it do not
need to write the float. See line 14 in the following example:
tudonghoatoancau.com