mini\Util\Math\Expr::asRational() Method

public

Signature

public function asRational(?int $precision = NULL): ?self

Parameters

Name Type Default Description
$precision ?int NULL Documentation missing

Returns

?self

Documentation

Get rational number representation of this expression

Attempts to express this value as Expr('/', p, q) where p, q are integers. A rational number is the quotient of two integers, unlike a general ratio which could involve irrationals (e.g., √2/√3).

Source

src/Util/Math/Expr.php:727-743