Take the following code as an example:
# include & ltstdio.h & gt
# include & ltmath.h & gt
void main()
{
Double I = 9;;
printf("%f\n ",sqrt(I));
Returns 0;
}
Extended data:
Math.h mathematical function library, the concrete realization of some mathematical calculation formulas is put in Math.h, specifically:
1, double acos(double x) returns the arccosine radian of x.
2.double asin(double x) returns the radian of the arc sine of x.
3.double atan(double x) returns the arctangent value of X in radians.
4.double atan2(double y, double x) obtains the arctangent value of y/x, which is expressed in radians. According to these two values, the correct symbol on the quadrant can be determined.
5.double cos(double x) returns the cosine of radian angle X. ..
6.double cosh(double x) gets the hyperbolic cosine of x.
7. Doublesin (Doublesx) returns the sine of the radian angle x.
8.double sinh(double x) obtains the hyperbolic sine value of X. ..
9.double tanh(double x) gets the hyperbolic tangent of x.
10, double exp(double x) returns the x power of e value.
1 1 and double log(double x) return the x of the natural logarithm (e-based logarithm).
12 and double log 10(double x) give the common logarithm of x (based on 10).
13 and double MODF (Double X, Double * Integer) return the decimal part (the part after the decimal point), and set the integer part of the integer.
14 and double pow(double x, double y) return the y power of x.
15 and double sqrt(double x) get the square root of x.
16, double ceil(double x) returns the smallest integer value greater than or equal to x.
17, double fabs (double x) returns the absolute value of x.
The maximum integer value returned by 18 and double floor(double x) is less than or equal to x.
The remainder of x divided by y is returned by 19 and double fmod(double x, double y).
References:
Math.h function library-Baidu encyclopedia