-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
Go 1.10
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
linux_amd64
What did you do?
When using package math/big, specifically big.Int.Exp(), I found that it cannot handle negative exponents correctly but simply returns 1.
What did you expect to see?
Compared to ModPow() in Java, Exp(x, y, z) should return mod inverse of (x ^ Abs(y)) mod N when y is negative.
What did you see instead?
Exp(x, y, z) simply returns 1 when y is negative.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.