MCPcopy Create free account
hub / github.com/cockroachdb/apd / ModInverse

Method ModInverse

bigint.go:661–669  ·  view source on GitHub ↗

ModInverse calls (big.Int).ModInverse.

(g, n *BigInt)

Source from the content-addressed store, hash-verified

659
660// ModInverse calls (big.Int).ModInverse.
661func (z *BigInt) ModInverse(g, n *BigInt) *BigInt {
662 var tmp1, tmp2, tmp3 big.Int //gcassert:noescape
663 zi := z.inner(&tmp1)
664 if zi.ModInverse(g.inner(&tmp2), n.inner(&tmp3)) == nil {
665 return nil
666 }
667 z.updateInner(zi)
668 return z
669}
670
671// ModSqrt calls (big.Int).ModSqrt.
672func (z *BigInt) ModSqrt(x, p *BigInt) *BigInt {

Callers 3

TestBigIntModInverseFunction · 0.80

Calls 2

innerMethod · 0.95
updateInnerMethod · 0.95

Tested by 3

TestBigIntModInverseFunction · 0.64