sqrt

(PHP 4, PHP 5, PHP 7)

sqrt평방 제곱근

설명

float sqrt ( float $arg )

arg의 평방제곱근을 반환합니다.

인수

arg

계산할 인수

반환값

arg의 평방제곱근이나, 음수일 경우엔 특수 값 NAN.

예제

Example #1 sqrt() 예제

<?php
// 정밀도는 precision 설정에 의존합니다.
echo sqrt(9); // 3
echo sqrt(10); // 3.16227766 ...
?>

참고

  • pow() - 거듭제곱 표현

add a note add a note

User Contributed Notes 1 note

up
-10
jouhni at web dot de
19 years ago
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
To Top