sqrt

Square root

double sqrt (
        double x
)

Arguments

x Argument (must be >= 0)

Return Value

The square root of x (sqrt(x)) is returned.

Explanation

The square root of x is calculated and its value is returned.

Notes

Error processing is shown in the table below:
 
Condition Return value Error
x<0 0 Domain error