Computes the principal square root of a double-precision floating-point number.
x < 0
input value
square root of x
x
var v = sqrt( 4.0 ); // returns 2.0
var v = sqrt( 9.0 ); // returns 3.0
var v = sqrt( 0.0 ); // returns 0.0
var v = sqrt( -4.0 ); // returns NaN
var v = sqrt( NaN ); // returns NaN
Computes the principal square root of a double-precision floating-point number.
Notes
x < 0
, the principal square root is not defined.