Class RationalTypeFactory
Static Factory for creating Rational types
- chippyash\Type\AbstractTypeFactory
- chippyash\Type\Number\Rational\RationalTypeFactory
Abstract
Namespace: chippyash\Type\Number\Rational
Located at Number/Rational/RationalTypeFactory.php
Namespace: chippyash\Type\Number\Rational
Located at Number/Rational/RationalTypeFactory.php
public static
|
|
public static
|
#
fromFloat( float|
Create a rational number from a float or FloatType Use Continued Fractions method of determining the rational number |
public static
|
|
public static
|
#
setDefaultFromFloatTolerance( integer $tolerance )
Set the default tolerance for all fromFloat() operations N.B. This sets a static so only needs to be done once |
setNumberType()
|
float |
CF_DEFAULT_TOLERANCE
default error tolerance for fromFloat() |
# 1.e-15 |
TYPE_DEFAULT,
TYPE_GMP,
TYPE_NATIVE
|