Zend\Math\BigInteger\Adapter\Gmp
GMP extension adapter
Synopsis
class Gmp
implements
AdapterInterface
{
- // methods
- public bool|string init()
- public string add()
- public string sub()
- public string mul()
- public string|null div()
- public string pow()
- public string sqrt()
- public string abs()
- public string mod()
- public string powmod()
- public int comp()
- public string intToBin()
- public string binToInt()
- public string baseConvert()
Hierarchy
Constants
Name | Value |
---|---|
BASE62_ALPHABET | '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' |
Methods
public
- abs() — Get absolute value of a big integer
- add() — Add two big integers
- baseConvert() — Base conversion. Bases 2..62 are supported
- binToInt() — Convert binary number into big integer
- comp() — Compare two big integers and returns result as an integer where Returns < 0 if leftOperand is less than rightOperand; > 0 if leftOperand is greater than rightOperand, and 0 if they are equal.
- div() — Divide two big integers and return integer part result.
- init() — Create string representing big integer in decimal form from arbitrary integer format
- intToBin() — Convert big integer into it's binary number representation
- mod() — Get modulus of a big integer
- mul() — Multiply two big integers
- pow() — Raise a big integers to another
- powmod() — Raise a big integer to another, reduced by a specified modulus
- sqrt() — Get the square root of a big integer
- sub() — Subtract two big integers