PHP pow() 函数
PHP 教程
· 2019-01-27 08:42:46
实例
pow() 的实例:
<?php
echo(pow(2,4) . "<br>");
echo(pow(-2,4) . "<br>");
echo(pow(-2,-4) . "<br>");
echo(pow(-2,-3.2));
?>
echo(pow(2,4) . "<br>");
echo(pow(-2,4) . "<br>");
echo(pow(-2,-4) . "<br>");
echo(pow(-2,-3.2));
?>
定义和用法
pow() 函数返回 x 的 y 次方。
语法
pow(x,y);
| 参数 | 描述 |
|---|---|
| x | 必需。规定要使用的底。 |
| y | 必需。规定指数。 |
技术细节
| 返回值: | x 的 y 次方。 |
|---|---|
| 返回类型: | 如果可能则返回 Integer,否则返回 Float。 |
| PHP 版本: | 4+ |
| PHP 更新日志: | PHP 4.0.6:如果可能则返回 integer。之前的版本只返回 float。 PHP 4.2.0:如果发生错误则不产生任何的警告。 |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Numerical Recipes 3rd Edition
William H. Press、Saul A. Teukolsky、William T. Vetterling、Brian P. Flannery / Cambridge University Press / 2007-9-6 / GBP 64.99
Do you want easy access to the latest methods in scientific computing? This greatly expanded third edition of Numerical Recipes has it, with wider coverage than ever before, many new, expanded and upd......一起来看看 《Numerical Recipes 3rd Edition》 这本书的介绍吧!