Yes, unpredictable performance is a price I'm willing to pay. I'm using a
dynamic language after all.
If you aren't willing to pay it, just use typed variables. Or even native
types, like num or int. Choose your own number representation -- there's
more than one way to do it.
The design philosophy in Perl 6 to make common things easy and other things
possible; pathological number sequences are not the common case.
On Tue, Jun 16, 2015 at 1:52 PM, Michael Zedeler <mich...@zedeler.dk> wrote:
> ...and unpredictable performance is a cost you're willing to pay?
> ---- The Sidhekin wrote ----
> On Tue, Jun 16, 2015 at 10:02 PM, Michael Zedeler <mich...@zedeler.dk>
>> 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.
> Rats means never having to worry about inaccurate float representations.
> $ perl -E '$i+=0.1 for 0..1000; say for $i, $i cmp 100.1' # oops …
> $ perl6 -e 'my $i; $i+=0.1 for 0..1000; .say for $i, $i cmp 100.1'
> Float inaccuracy is one of the things I'm really looking forward to
> forgetting. :)