 | C251 User's Guide |  |
|
|
| sqrt| Summary | | | Description | The sqrt function calculates the square root of x. | | Return Value | The sqrt function returns the positive square root of x. - If x < 0, sqrt returns NaN.
| | See Also | pow | | Example |
#include <math.h>
#include <stdio.h> /* for printf */
void tst_sqrt (void) {
float x;
float y;
x = 25.0;
y = sqrt (x); /* y = 5 */
printf ("SQRT(%f) = %f\n", x, y);
}
|
|
|