Yes. It looks nice that Perl 6 recognizes zero in this way, but the consequence is that each implementation of Perl 6 has to run a gcd algorithm every now and then.
I'd be very surprised if the computational complexity of any useful (even approximate) gcd algorithm doesn't scale with the with the size of the denominators, which is why I can't see that it is feasible to use for real numerical applications. I'm not saying that there isn't any alternative to the way other languages implements floats, but Rats in particular seems to require a nondeterministic algorithm in order to be of practical use. Regards, Michael. ---- Aristotle Pagaltzis wrote ---- >* Michael Zedeler <mich...@zedeler.dk> [2015-06-16 18:55]: >> For instance, why have Complex and Rat numbers in the core? If you're >> not working in a very specialized field (which probably *isn't* >> numerical computation), those datatypes are just esoteric constructs >> that you'll never use. > >https://www.youtube.com/watch?v=S0OGsFmPW2M