niner / Inline-Perl5

Use Perl 5 code in a Raku program
Artistic License 2.0
95 stars 30 forks source link

ntheory::factor returns a bigint which gets mangled #136

Open ajs opened 5 years ago

ajs commented 5 years ago
$ perl6 -e 'use Inline::Perl5; my $p = Inline::Perl5.new; say $p.run("use ntheory; \\&ntheory::factor")("38685626227668133590597631");'
[31 131071 -8925771267375793185]

Comparable Perl 5:

$ perl -E 'use ntheory; say join " ", ntheory::factor("38685626227668133590597631")'
31 131071 9520972806333758431
niner commented 5 years ago

This is easy enough to fix in Inline::Perl5 but unfortunately this won't gain us much as rakudo cannot handle native unsigned integers larger than 2^63 yet.