method Rat
Documentation for method Rat assembled from the following types:
class Numeric
From Numeric
(Numeric) method Rat
method Rat(Numeric: Real = 1.0e-6 --> Rat)
If this Numeric is equivalent to a Real, return a Rat which is within $epsilon of that Real's value. Fail with X::Numeric::Real otherwise.
class RatStr
From RatStr
(RatStr) method Rat
method Rat
Returns the Rat value of the RatStr.
class Str
From Str
(Str) method Rat
Defined as:
method Rat(Str: --> Rational)
Coerces the string to a Rat object, using the same rules as Str.Numeric. If the denominator is larger than 64-bits is it still kept and no degradation to Num occurs.
role Real
From Real
(Real) method Rat
method Rat(Real: Real = 1e-6)
Converts the number to a Rat with the precision $epsilon.