gmp_mod

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Modulo operation GMP gmp_mod ( GMP $n, GMP $d ) Calculates n modulo d. The result is always non-negative, the sign of d is ignored. Parameters: n 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. d

gmp_legendre

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Legendre symbol int gmp_legendre ( GMP $a, GMP $p ) Compute the » Legendre symbol of a and p. p should be odd and must be positive. Parameters: a 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. p

gmp_jacobi

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Jacobi symbol int gmp_jacobi ( GMP $a, GMP $p ) Computes » Jacobi symbol of a and p. p should be odd and must be positive. Parameters: a 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. p

gmp_invert

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Inverse by modulo GMP gmp_invert ( GMP $a, GMP $b ) Computes the inverse of a modulo b. Parameters: a 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. b Either a GMP number resource in

gmp_intval

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Convert GMP number to integer int gmp_intval ( GMP $gmpnumber ) This function converts GMP number into native PHP integers. Parameters: gmpnumber 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. Retu

gmp_init

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Create GMP number GMP gmp_init ( mixed $number [, int $base = 0 ] ) Creates a GMP number from an integer or string. Parameters: number An integer or a string. The string representation can be decimal, hexadecimal or octal. base The base. The base may vary from 2 to 36. If base is 0 (default value), t

gmp_import

(PHP 5, PHP 7 >= 5.6.1) Import from a binary string GMP gmp_import ( string $data, integer $word_size, integer $options ) Import a GMP number from a binary string Parameters: data The binary string being imported word_size Default value is 1. The number of bytes in each chunk of binary data. This is mainly used in conjunction with th

gmp_hamdist

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Hamming distance int gmp_hamdist ( GMP $a, GMP $b ) Returns the hamming distance between a and b. Both operands should be non-negative. Parameters: a 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. It should be posit

gmp_gcdext

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Calculate GCD and multipliers array gmp_gcdext ( GMP $a, GMP $b ) Calculates g, s, and t, such that a*s + b*t = g = gcd(a,b), where gcd is the greatest common divisor. Returns an array with respective elements g, s and t. This function can be used to solve linear Diophantine equations in two variables. These are equations that allow only integer solutions and have the form: a*x + b*y = c.

gmp_gcd

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Calculate GCD GMP gmp_gcd ( GMP $a, GMP $b ) Calculate greatest common divisor of a and b. The result is always positive even if either of, or both, input operands are negative. Parameters: a 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 t