gmp_sqrtrem()
gmp_sqrtrem - Square root with remainder
Syntax
array gmp_sqrtrem (
resource $a)
Arguments
- a - The number being square rooted. It can be either a GMP number resource, or a numeric string given that it is possible to convert the latter to a number.
Description
Calculate the square root of a number, with remainder.
Version
PHP 4.0.4, 5
Return value
Returns array where first element is the integer square root of a and the second is the remainder (i.e., the difference between a and the first element squared).