What's the status of numeric upgrades in Perl 6?  Is see the docs say "Perl 6
intrinsically supports big integers and rationals through its system of type
declarations. Int automatically supports promotion to arbitrary precision" but
it looks like it's doing the same thing as Perl 5.

$ ./perl6 -e 'say 2**40'
1099511627776

$ ./perl6 -e 'say 2**50'
1.12589990684262e+15

$ ./perl6 -e 'say 2**1100'
inf

And...

$ ./perl6 -e 'my Int $foo = 2**32;  say $foo'
Type check failed
current instr.: 'parrot;Perl6Object;infix:=' pc 60 (src/gen_builtins.pir:52)
called from Sub '_block11' pc 98 (EVAL_12:41)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806
(src/PCT/HLLCompiler.pir:480)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1298
(src/PCT/HLLCompiler.pir:707)
called from Sub 'parrot;Perl6::Compiler;main' pc 17029 (perl6.pir:172)
perl6(4325) malloc: ***  Deallocation of a pointer not malloced: 0x4157170;
This could be a double free(), or free() called with the middle of an
allocated block; Try setting environment variable MallocHelp to see tools to
help debug
perl6(4325) malloc: ***  Deallocation of a pointer not malloced: 0xda71b; This
could be a double free(), or free() called with the middle of an allocated
block; Try setting environment variable MallocHelp to see tools to help debug
Bus error (core dumped)

though hopefully that's transient.


-- 
"Clutter and overload are not an attribute of information,
 they are failures of design"
    -- Edward Tufte

Reply via email to