Skip to content

math/big: handle negative moduli in ModInverse #24949

@bmkessler

Description

@bmkessler

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions