float sqrt ( float $arg )
sqrt() returns the square root of $arg
※ available F/W version : all
Returns the square root of $arg or the special value NAN for negative numbers
<?php
$arg1 = 2.0;
$ret1 = sqrt($arg1);
$arg2 = -2.0;
$ret2 = sqrt($arg2);
echo "ret1 = $ret1\r\n"; // OUTPUT: ret1 = 1.4142135623731
echo "ret2 = $ret2\r\n"; // OUTPUT: ret2 = NAN
?>
This function is identical to the PHP group’s sqrt() function.