实例返回不同数的平方根: <?php echo(sqrt(0) . "<br>"); echo(sqrt(1) . "<br>"); echo(sqrt(9) . "<br>"); echo(sqrt(0.64) . "<br>"); echo(sqrt(-9)); ?> 定义和用法sqrt() 函数返回一个数的平方根。 语法sqrt(number);
技术细节返回值: | 返回 number 的平方根,如果 number 是负数则返回 NAN。 |
---|
返回类型: | Float |
---|
PHP 版本: | 4+ |
---|
下载地址: PHP sinh() 函数 PHP srand() 函数 |