Example usage of C language sqrt functions
- 2020-07-21 09:12:39
- OfStack
c Language Usage of sqrt functions
The sqrt function is used to compute the square root of a non-negative real number.
The function prototype of sqrt: the function prototype of math.h header file in VC6.0 is double sqrt(double);
Description: sqrt is Square Root Calculations (square root calculation), which tests the floating-point capability of CPU.
Header file: ES24en.h
Program example:
#include <math.h>
#include <stdio.h>
int main(void)
{
double x = 4.0, result;
result = sqrt(x); //result*result = x
printf("The square root of % is %\n", x, result);
return 0;
}
Above is the introduction of all relevant content, you can contact this site if you need to add this site.