math/big: handle negative moduli in ModInverse #24949
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go version go1.10 linux/amd64
Does this issue reproduce with the latest release?
yes
What did you do?
Calculate ModInverse with positive and negative moduli.
https://play.golang.org/p/oCjaCyBdbp7
What did you expect to see?
Both should give the same result for ModInverse.
What did you see instead?
Negative moduli returns 0.
The text was updated successfully, but these errors were encountered: