gmp_perfect_square(3) php man page | unix.com

Man Page: gmp_perfect_square

Operating Environment: php

Section: 3

GMP_PERFECT_SQUARE(3)							 1						     GMP_PERFECT_SQUARE(3)

gmp_perfect_square - Perfect square check

SYNOPSIS
bool gmp_perfect_square (GMP $a)
DESCRIPTION
Check if a number is a perfect square.
PARAMETERS
o $a - The number being checked as a perfect square. Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
RETURN VALUES
Returns TRUE if $a is a perfect square, FALSE otherwise.
EXAMPLES
Example #1 gmp_perfect_square(3) 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")); ?> The above example will output: bool(true) bool(false) bool(true)
SEE ALSO
gmp_sqrt(3), gmp_sqrtrem(3). PHP Documentation Group GMP_PERFECT_SQUARE(3)
Related Man Pages
gmp_div_qr(3) - php
gmp_init(3) - php
gmp_prob_prime(3) - php
gmp_setbit(3) - php
is_float(3) - php
Similar Topics in the Unix Linux Community
Please Welcome Don Cragun as Lead Moderator
Status of UNIX.COM Forum Transformation
Please Welcome Ravinder Singh to the Moderation Team
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Wolf Machowitsch
Denial Of Service Attack Update