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

mpyc mult3.py example gives result different from expected when M > 3 #57

Open
danxinnoble opened this issue Nov 24, 2021 · 1 comment

Comments

@danxinnoble
Copy link
Contributor

For instance:
root@c609d1fbbcde:~/source# python mult3.py -M 6
2021-11-24 11:51:28,496 Start MPyC runtime v0.7
2021-11-24 11:51:28,830 All 6 parties connected.
player 0 input: 4000
expected: 64000000000
result: -740248758255576370955515465
2021-11-24 11:51:28,885 Stop MPyC runtime -- elapsed time: 0:00:00.388515

@marsella
Copy link
Collaborator

This library overflows silently, and sometimes has unexpected overflows due to intermediate values in the computation (this is more common with division). I see that 64000000000 is 35 bits, maybe it's overflowing a 32-bit integer?

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