Home > php教程 > php手册 > body text

关于php开平方问题

WBOY
Release: 2016-06-06 20:00:31
Original
1457 people have browsed it

这个算法还搞不定。LuciferStar给我参考的...怕自己忘了,先写出来。 ----------- sqrt (PHP 3, PHP 4 ) sqrt -- 平方根 说明 float sqrt ( float arg) 返回 arg 的平方根。 ?php // Precision depends on your precision directive echo sqrt(9)

这个算法还搞不定。LuciferStar给我参考的...怕自己忘了,先写出来。

-----------

sqrt
(PHP 3, PHP 4 )

sqrt -- 平方根
说明
float sqrt ( float arg)


返回 arg 的平方根。

 

// Precision depends on your precision directive
echo sqrt(9); // 3
echo sqrt(10); // 3.16227766 ...
?>
 

 

参见 pow()。  

------------

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!