-
Notifications
You must be signed in to change notification settings - Fork 13
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
Error thrown from usubMag() when trying to assign dig[1]=0 #16
Comments
I'm not sure it's an issue though.
usubMag, subtracts the magnitude of the number, which by definition cannot go negative. So the current number must always >= sub, so a reallocation() to increase length should never be necessary.
…________________________________
Från: lebecki <[email protected]>
Skickat: den 15 april 2020 17:02
Till: bwakell/Huldra <[email protected]>
Kopia: Subscribed <[email protected]>
Ämne: [bwakell/Huldra] Error thrown from usubMag() when trying to assign dig[1]=0 (#16)
Found now error (?) in usubMag(). I tried to apply changes to make it more similar to uaddMag(). Hopefully I am right.
See: my fork<lebecki@d5cddc2>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#16>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAKMTEKTTXTTLLDVO5YB3G3RMXSB7ANCNFSM4MIXY24Q>.
|
If there is an issue, it must be in one of the methods calling it (i.e. some invariant breaks). So if you have a concrete example of a failing scenario (which is entirely possible ^^), do share. |
Example sent to you. I think in this example the call that is causing the trouble looks like BigInt(3).sub(1) - rather simple. |
More precisely speaking, here is the code of a simple failing scenario: |
Oh yeah a classic issue of assuming that just because it's a Part of the issue is in Should instead be in an |
Found now error (?) in usubMag(). I tried to apply changes to make it more similar to uaddMag(). Hopefully I am right.
See: my fork
The text was updated successfully, but these errors were encountered: