cc [ flag ... ] file ... -lm [ library ... ] #include <math.h>double sqrt(double x);
Upon successful completion, sqrt() returns the square root of x.
If x is NaN, NaN is returned.
If x is negative, NaN is returned and errno is set to EDOM.
An application wishing to check for error situations should set errno to 0 before calling sqrt(). If errno is non-zero on return, or the return value is NaN, an error has occurred.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|