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

Incorrect results for three-argument pow #18

Open
betaveros opened this issue Oct 19, 2014 · 1 comment
Open

Incorrect results for three-argument pow #18

betaveros opened this issue Oct 19, 2014 · 1 comment

Comments

@betaveros
Copy link

Results from running Python on repl.it, which I'm assuming reflect here:

   pow(2,36,100000)
=> 69184L
   2**36 % 100000
=> 76736L

76736 is the correct result. Also:

   pow(2,40,100000)
=> 127776

which is greater than the passed modulus; it should be 27776.

@aidanhs
Copy link

aidanhs commented Apr 12, 2015

FWIW, empython (a more up-to-date build of python with emscripten) computes both of these correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants