Classes and interfaces

Math_BigInteger

Pure-PHP arbitrary precision integer arithmetic library.

« More »

Constants

 

MATH_BIGINTEGER_BARRETT

MATH_BIGINTEGER_BARRETT 

see \global\Math_BigInteger::_barrett()
 

MATH_BIGINTEGER_CLASSIC

MATH_BIGINTEGER_CLASSIC 

see \global\Math_BigInteger::_remainder()
 

$cache[MATH_BIGINTEGER_DATA] contains the cached data.

MATH_BIGINTEGER_DATA 

 

Karatsuba Cutoff

MATH_BIGINTEGER_KARATSUBA_CUTOFF 

At what point do we switch between Karatsuba multiplication and schoolbook long multiplication?

access private
 

The largest digit that may be used in addition / subtraction

MATH_BIGINTEGER_MAX_DIGIT52 

(we do pow(2, 52) instead of using 4503599627370496, directly, because some PHP installations will truncate 4503599627370496)

access private
 

MATH_BIGINTEGER_MODE

MATH_BIGINTEGER_MODE 

 

To use the BCMath library

MATH_BIGINTEGER_MODE_BCMATH 

(if enabled; otherwise, the internal implementation will be used)

 

To use the GMP library

MATH_BIGINTEGER_MODE_GMP 

(if present; otherwise, either the BCMath or the internal implementation will be used)

 

To use the pure-PHP implementation

MATH_BIGINTEGER_MODE_INTERNAL 

 

MATH_BIGINTEGER_MONTGOMERY

MATH_BIGINTEGER_MONTGOMERY 

see \global\Math_BigInteger::_montgomery()
see \global\Math_BigInteger::_prepMontgomery()
 

MATH_BIGINTEGER_NONE

MATH_BIGINTEGER_NONE 

see \global\Math_BigInteger::__clone()
 

MATH_BIGINTEGER_POWEROF2

MATH_BIGINTEGER_POWEROF2 

see \global\Math_BigInteger::_mod2()
 

$result[MATH_BIGINTEGER_SIGN] contains the sign.

MATH_BIGINTEGER_SIGN 

 

$result[MATH_BIGINTEGER_VALUE] contains the value.

MATH_BIGINTEGER_VALUE 

 

Cache constants

MATH_BIGINTEGER_VARIABLE 

$cache[MATH_BIGINTEGER_VARIABLE] tells us whether or not the cached data is still valid.