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

Method Divide

src/crypto/muhash.cpp:261–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void Num3072::Divide(const Num3072& a)
262{
263 if (this->IsOverflow()) this->FullReduce();
264
265 Num3072 inv{};
266 if (a.IsOverflow()) {
267 Num3072 b = a;
268 b.FullReduce();
269 inv = b.GetInverse();
270 } else {
271 inv = a.GetInverse();
272 }
273
274 this->Multiply(inv);
275 if (this->IsOverflow()) this->FullReduce();
276}
277
278Num3072::Num3072(const unsigned char (&data)[BYTE_SIZE]) {
279 for (int i = 0; i < LIMBS; ++i) {

Callers 1

FinalizeMethod · 0.80

Calls 4

IsOverflowMethod · 0.95
FullReduceMethod · 0.95
MultiplyMethod · 0.95
GetInverseMethod · 0.80

Tested by

no test coverage detected