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

Method ModSqrt

bigint.go:672–681  ·  view source on GitHub ↗

ModSqrt calls (big.Int).ModSqrt.

(x, p *BigInt)

Source from the content-addressed store, hash-verified

670
671// ModSqrt calls (big.Int).ModSqrt.
672func (z *BigInt) ModSqrt(x, p *BigInt) *BigInt {
673 var tmp1, tmp2 big.Int //gcassert:noescape
674 var tmp3 big.Int // escapes because of https://github.com/golang/go/pull/50527.
675 zi := z.inner(&tmp1)
676 if zi.ModSqrt(x.inner(&tmp2), p.inner(&tmp3)) == nil {
677 return nil
678 }
679 z.updateInner(zi)
680 return z
681}
682
683// Mul calls (big.Int).Mul.
684func (z *BigInt) Mul(x, y *BigInt) *BigInt {

Callers 3

testModSqrtFunction · 0.95
TestBigIntModSqrtFunction · 0.95

Calls 2

innerMethod · 0.95
updateInnerMethod · 0.95

Tested by 3

testModSqrtFunction · 0.76
TestBigIntModSqrtFunction · 0.76