MCPcopy Create free account
hub / github.com/ElementsProject/elements / mul

Function mul

src/crypto/muhash.cpp:33–38  ·  view source on GitHub ↗

[c0,c1] = a * b */

Source from the content-addressed store, hash-verified

31
32/** [c0,c1] = a * b */
33inline void mul(limb_t& c0, limb_t& c1, const limb_t& a, const limb_t& b)
34{
35 double_limb_t t = (double_limb_t)a * b;
36 c1 = t >> LIMB_SIZE;
37 c0 = t;
38}
39
40/* [c0,c1,c2] += n * [d0,d1,d2]. c2 is 0 initially */
41inline void mulnadd3(limb_t& c0, limb_t& c1, limb_t& c2, limb_t& d0, limb_t& d1, limb_t& d2, const limb_t& n)

Callers 6

MultiplyMethod · 0.85
PolyModFunction · 0.85
DivModFunction · 0.85
MakeMonicFunction · 0.85
BerlekampMasseyFunction · 0.85
AddToOddSyndromesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected