Methods summary
public
|
#
__construct( mixed $value )
Constructor - check for gmp support
Constructor - check for gmp support
Parameters
Throws
Overrides
|
public
chippyash\Type\Number\GMPIntType
|
#
negate( )
Negates the number
Returns
Overrides
|
public
chippyash\Type\Number\Complex\GMPComplexType
|
#
asComplex( )
Return the number as a GMPComplex number i.e. n+0i
Return the number as a GMPComplex number i.e. n+0i
Returns
Overrides
|
public
chippyash\Type\Number\Rational\GMPRationalType
|
#
asRational( )
Return number as GMPRational number. NB, numerator and denominator will be
caste as GMPIntTypes
Return number as GMPRational number. NB, numerator and denominator will be
caste as GMPIntTypes
Returns
Overrides
|
public
chippyash\Type\Number\FloatType
|
#
asFloatType( )
Return number as a FloatType number.
Return number as a FloatType number.
Returns
Overrides
|
public
chippyash\Type\Number\GMPIntType
|
#
abs( )
Return the absolute value of the number
Return the absolute value of the number
Returns
Overrides
|
public
array
|
#
factors( )
Return all factors of this number (sorted) Returned factors are strings
Return all factors of this number (sorted) Returned factors are strings
Returns
array [factor,factor, ...]
Overrides
|
public
array
|
|
public
string
|
#
__toString( )
Magic method - convert to string
Magic method - convert to string
Returns
string string
Overrides
|
public
integer
|
#
get( )
Get the value of the object typed properly as a PHP Native type
Get the value of the object typed properly as a PHP Native type
Returns
integer integer
Overrides
|
public
GMP|resource
|
#
gmp( )
Return the value of number as a gmp resource or object
Return the value of number as a gmp resource or object
Returns
GMP|resource resource|gmp object
Implementation of
|
public
chippyash\Type\Number\GMPIntType
|
#
asGMPIntType( )
Return number as GMPIntType number.
Return number as GMPIntType number.
Returns
Implementation of
|
public
chippyash\Type\Number\IntType
|
#
asIntType( )
Return number as IntType
Returns
Overrides
|
public
chippyash\Type\Number\Complex\GMPComplexType
|
#
asGMPComplex( )
Return the number as a GMPComplex number i.e. n+0i
Return the number as a GMPComplex number i.e. n+0i
Returns
Implementation of
|
public
chippyash\Type\Number\Rational\GMPRationalType
|
#
asGMPRational( )
Return number as GMPRational number. NB, numerator and denominator will be
caste as GMPIntTypes
Return number as GMPRational number. NB, numerator and denominator will be
caste as GMPIntTypes
Returns
Implementation of
|