Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%% fails with bigInt, bigInt arguments #1640

Closed
thundergnat opened this issue Mar 22, 2018 · 1 comment
Closed

%% fails with bigInt, bigInt arguments #1640

thundergnat opened this issue Mar 22, 2018 · 1 comment
Labels
regression Issue did not exist previously tests needed Issue is generally resolved but tests were not written yet

Comments

@thundergnat
Copy link
Contributor

The Problem

It seems that %% (is divisible by) lost it's bigInt, bigInt candidate sometime in the past year. It used to work, the last time I actively used it was in Rakudo 2016.10.

See Rosettacode task: http://rosettacode.org/wiki/Tonelli-Shanks_algorithm#Perl_6

Expected Behavior

perl6 -e' say 23067200747291880127814827277075079921671259751791 %% 100000000000000000000000000000000000000000000000577;'

should return False.

Actual Behavior

perl6 -e' say 23067200747291880127814827277075079921671259751791 %% 100000000000000000000000000000000000000000000000577;'

Returns:
Cannot unbox 164 bit wide bigint into native integer
in block at -e line 1

Steps to Reproduce

Run:
perl6 -e' say 23067200747291880127814827277075079921671259751791 %% 100000000000000000000000000000000000000000000000577;'

See output from bisectable: https://gist.github.com/0c0a04c16226bb81175a5bdee18ad4b8

Which points to commit: 755e25b

Environment

  • Operating system: Linux Mint 18
  • Compiler version (perl6 -v): This is Rakudo version 2018.03 built on MoarVM version 2018.03
    implementing Perl 6.c.
@AlexDaniel AlexDaniel added regression Issue did not exist previously BLOCKER Preventing the next release of rakudo, or just needing attention before the release and removed BLOCKER Preventing the next release of rakudo, or just needing attention before the release labels Mar 22, 2018
@lizmat
Copy link
Contributor

lizmat commented Mar 22, 2018

Fixed with 33c52db , tests needed

@lizmat lizmat added the tests needed Issue is generally resolved but tests were not written yet label Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue did not exist previously tests needed Issue is generally resolved but tests were not written yet
Projects
None yet
Development

No branches or pull requests

3 participants