MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / Add

Method Add

ecgo/examples/log_up/main.go:20–25  ·  view source on GitHub ↗
(api frontend.API, other *RationalNumber)

Source from the content-addressed store, hash-verified

18}
19
20func (r *RationalNumber) Add(api frontend.API, other *RationalNumber) RationalNumber {
21 return RationalNumber{
22 Numerator: api.Add(api.Mul(r.Numerator, other.Denominator), api.Mul(other.Numerator, r.Denominator)),
23 Denominator: api.Mul(r.Denominator, other.Denominator),
24 }
25}
26
27// Construct a binary summation tree to sum all the values
28func SumRationalNumbers(api frontend.API, vs []RationalNumber) RationalNumber {

Callers 6

SumRationalNumbersFunction · 0.45
CombineColumnFunction · 0.45
xorFunction · 0.45
checkBitsFunction · 0.45
andFunction · 0.45
andFunction · 0.45

Calls 1

MulMethod · 0.45

Tested by

no test coverage detected