gmp_or
gmp_popcount
GMP 함수 목록
PHP Manual

# gmp_perfect_square

(PHP 4 >= 4.0.4, PHP 5)

gmp_perfect_square — Perfect square check

### 설명

bool gmp_perfect_square ( resource `$a` )

Check if a number is a perfect square.

### 인수

`a`

  The number being checked as a perfect square.

  GMP 수 resource나 수로 변환할 수 있는 문자열일 수 있습니다.

### 반환값

Returns `TRUE` if `a` is a perfect square, `FALSE` otherwise.

### 예제

Example #1 gmp_perfect_square() example

`<?php
// 3 * 3, perfect square
var_dump(gmp_perfect_square("9"));
// not a perfect square
var_dump(gmp_perfect_square("7"));
// 1234567890 * 1234567890, perfect square
var_dump(gmp_perfect_square("1524157875019052100"));
?>`

위 예제의 출력:

    bool(true)
    bool(false)
    bool(true)

### 참고

- gmp_sqrt() - Calculate square root
- gmp_sqrtrem() - Square root with remainder

gmp_or
gmp_popcount
GMP 함수 목록
PHP Manual