3 ms·
Rational numbers instead of floating point as the default real type.
by jinpa_zangpo 6y ago
Rational numbers instead of floating point as the default real type.
- db48x 6y agoThat's not exactly a new innovation though; Lisp has had a whole numeric tower for a few decades now…
- raiph 6y agoI was taught in school that `0.1` is rational. Afaik it isn't in any lisps. I think that's the point the GP was making. That said, while making `0.1 + 0.2 - 0.3` come out as exactly zero, with a clean and principled way to avoid things going pathological when the denominator gets large, is nice, it's hardly one of Raku's "main contributions to the programming language design space that I probably haven't seen elsewhere?"! :)