mini\Util\Math\Expr::floatToRatio()
Method
private
static
Signature
private static function floatToRatio(float $value): ?self
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value |
float |
required | Documentation missing |
Returns
?self
Documentation
Convert float to exact rational (only for dyadic rationals)
IEEE 754 floats are exactly representable only when they're of the form p/2^k (dyadic rationals).