To get any root of a number your can use the pow() function:
pow(8, 1/3)
which gives you the third root of eight.
Jouhni
sqrt
(PHP 4, PHP 5)
sqrt — 평방 제곱근
설명
float sqrt
( float $arg
)
arg의 평방제곱근을 반환합니다.
인수
- arg
-
계산할 인수
반환값
arg의 평방제곱근이나, 음수일 경우엔 특수 값 NAN.
예제
Example #1 sqrt() 예제
<?php
// 정밀도는 precision 설정에 의존합니다.
echo sqrt(9); // 3
echo sqrt(10); // 3.16227766 ...
?>
jouhni at web dot de ¶
8 years ago
