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

Big Integers are incorrect resulting in errors doing modular arithmetic #130

Open
pfzetto opened this issue Jan 10, 2024 · 2 comments
Open

Comments

@pfzetto
Copy link

pfzetto commented Jan 10, 2024

Hello,
thanks for this nice calculator.
I've noticed that big values are used incorrectly (without a warning), causing severe errors when doing modular arithmetic.
Example:

>> 102917891787974167652675165103770584593272553218
102 917 891 787 974 168 813 411 935 694 013 722 883 721 789 440

Also values over 1 000 000 cannot be displayed using the base x option.

Is this a known limitation?
I think an operation like 0x1206ff74fcfe76f159750c0e1ccc34a5d0c23f02 mod 0xb0b should not return a result when it's wrong.

Reagards,
Paul

@pfzetto pfzetto changed the title Hex Values are incorrect over 10 000 000 = 0x98967 Big Integers are incorrect resulting in errors doing modular arithmetic Jan 10, 2024
@PaddiM8
Copy link
Owner

PaddiM8 commented Mar 26, 2024

Hmm yeah it is not as accurate when parsing big numbers. When you do eg. 10^100 you will get the exact value, but not if when you do 100000000000000000. This needs to be fixed indeed.

PaddiM8 added a commit that referenced this issue Apr 2, 2024
@PaddiM8
Copy link
Owner

PaddiM8 commented Apr 2, 2024

This is mostly fixed now, but still a bit limited with different bases. 0x1206ff74fcfe76f159750c0e1ccc34a5d0c23f02 mod 0xb0b gives me 475 now.

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