Procs
func prod[rLen, aLen, bLen: static int](r: var Limbs[rLen]; a: Limbs[aLen]; b: Limbs[bLen]) {....raises: [], gcsafe.}
-
Multi-precision multiplication: r <- a * b.
a, b, r can have a different number of limbs.
If r.limbs.len < a.limbs.len + b.limbs.len, the result will be truncated, i.e. it will be a * b (mod (2^WordBitwidth)^r.limbs.len).
Source Edit func prod_high_words[rLen, aLen, bLen: static int](r: var Limbs[rLen]; a: Limbs[aLen]; b: Limbs[bLen]; lowestWordIndex: static int) {....raises: [], gcsafe.}
-
Multi-precision multiplication keeping only high words: r <- a * b >> (2^WordBitWidth)^lowestWordIndex.
a, b, r can have a different number of limbs.
If r.limbs.len < a.limbs.len + b.limbs.len - lowestWordIndex, the result will be truncated, i.e. it will be a * b >> (2^WordBitWidth)^lowestWordIndex (mod (2^WordBitwidth)^r.limbs.len).
Source Edit