Re:Inventor Claims to Have Solved Floating Point Error Problem
by dreamcompiler on Friday January 19, 2018 @12:06AM
(#16184251)
Yes. Common Lisp is an example of a language that can represent rationals exactly and do arithmetic on them. You can avoid floating-point precision loss by using this method. But there are drawbacks:
1) The numerator and denominator will often turn into bignums as a calculation progresses, consuming ever-larger amounts of space and time, and
2) This won't help you with any calculation involving irrationals, except to prevent your initial imprecision from growing larger.
Is possible to convert to rationals in calculations?
So if I do:
1/3 + 4 + sum / total it record values properly?