You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rational.of (and indeed, all implicit conversion to Rational) from a decimal has a maximum denominator of 1000 due to floating-point precision issues. I'll see if I can do anything about these cases.
Rational.of(1000000000000)
See:
> 1000000000000|0
-727379968
Numerators and denominators in Rational can only be exact numbers.
Version: 1.0.0
Problem
Rationals don't support very big/very small numbers and sometimes produce incorrect result
Desired Behavior
Work correctly ._.
How to Reproduce
Rational.of(0.00005)
0 / 1
Rational.of(1000000000000)
-727379968 / 1
(Probably integer size issue, but ._.)The text was updated successfully, but these errors were encountered: