Math sqrt

(PHP 4, PHP 5, PHP 7, PHP 8)

sqrt — Square root


설명

sqrt(float $num): float

num의 제곱근을 반환합니다.


매개변수

num
처리할 인수

반환 값

num의 제곱근 또는 음수에 대한 특수 값 NAN.


Examples

예제 #1 sqrt() 예제

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

기타

  • pow() - Exponential expression