On Wed Jan 19 01:29:06 2011, payload wrote:
> On Mo, 2011-01-17 at 13:34 -0800, Moritz Lenz via RT wrote:
> > On 01/16/2011 07:47 PM, Gilbert R. Roehrbein (via RT) wrote:
> > > fixes the problem which you encounter when you try to evaluate
> > > +(23..2300000000)
> > 
> > ... and creates others. Consider
> > 
> > (0..^3.3).Numeric
> > 
> > Where you patch makes it return 3, but 4 is the correct answer.
> 
> shame :( but fixed it ^^
> 
> > Maybe checking for ~~ Int instead of ~~ Numeric helps, but we also need
> > to more tests.
> 
> does now work for following ranges
> 
> for $(^3.3), $(0..3), $(-2..0), $(-2.9..3.1), $(1.9..3.1) {
>     my $a := +$_;
>     my $b := .elems;
>     say "{.perl}\t\t$a != $b" if $a != $b;
> }


Sorry about the delay:

Added tests to S02-types/range.t, and applied a heavily modified version of the 
patch (there 
were some edge cases that were still failing with the patch as is.)

$ time ./perl6 -e 'say +(123..123121231231231212321)'
123121231231231212199

real    0m0.475s
user    0m0.369s
sys     0m0.101s


-- 
Will "Coke" Coleda

Reply via email to