PHP sqrt() 函数
PHP 教程
· 2019-01-27 10:12:15
实例
返回不同数的平方根:
<?php
echo(sqrt(0) . "<br>");
echo(sqrt(1) . "<br>");
echo(sqrt(9) . "<br>");
echo(sqrt(0.64) . "<br>");
echo(sqrt(-9));
?>
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 的平方根,如果 number 是负数则返回 NAN。 |
|---|---|
| 返回类型: | Float |
| PHP 版本: | 4+ |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
GWT in Action
Robert Hanson、Adam Tacy / Manning Publications / 2007-06-05 / USD 49.99
This book will show Java developers how to use the Google Web Toolkit (GWT) to rapidly create rich web-based applications using their existing skills. It will cover the full development cycle, from ......一起来看看 《GWT in Action》 这本书的介绍吧!