Try Raku Beta
Rationally Rational

You may have noticed in the previous slide that (1/3) is a Rat. This is short for Rational. We can now see how Raku has been "doing the right thing" in many of these examples.
Unlike some other languages like JavaScript or Ruby, Raku represents rational numbers symbolically and not as floating point approximations.

Try this classic example demonstrating the trouble with floating point representation:
0.3 - 0.2 - 0.1

Notice the result is actually zero as it should be. (0.3 - 0.2 - 0.1) == 0

Try the same example in some other language like Python, Ruby, or JavaScript and you may be surprised. To understand why this happens see this site.

Terminal