function BigNumber::toFloat
Returns an approximation of this number as a floating-point value.
Note that this method can discard information as the precision of a floating-point value is inherently limited.
If the number is greater than the largest representable floating point number, positive infinity is returned. If the number is less than the smallest representable floating point number, negative infinity is returned.
3 methods override BigNumber::toFloat()
- BigDecimal::toFloat in vendor/
brick/ math/ src/ BigDecimal.php - Returns an approximation of this number as a floating-point value.
- BigInteger::toFloat in vendor/
brick/ math/ src/ BigInteger.php - Returns an approximation of this number as a floating-point value.
- BigRational::toFloat in vendor/
brick/ math/ src/ BigRational.php - Returns an approximation of this number as a floating-point value.
File
-
vendor/
brick/ math/ src/ BigNumber.php, line 495
Class
- BigNumber
- Common interface for arbitrary-precision rational numbers.
Namespace
Brick\MathCode
public abstract function toFloat() : float;