Hacker News new | ask | show | jobs
by jinpa_zangpo 1987 days ago
Rational numbers instead of floating point as the default real type.
1 comments

That's not exactly a new innovation though; Lisp has had a whole numeric tower for a few decades now…
I 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?"! :)