php man page for gmp_perfect_square

Query: gmp_perfect_square

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

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
isset(3) - php
gmp_div_r(3) - php
gmp_init(3) - php
gmp_strval(3) - php
uopz_flags(3) - php
Similar Topics in the Unix Linux Community
Simple rules of the UNIX.COM forums:
UNIX.COM 2017 Year End Summary
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Wolf Machowitsch
Denial Of Service Attack Update