MCPcopy Create free account
hub / github.com/albertobsd/keyhunt / ModDouble

Method ModDouble

gmp256k1/IntMod.cpp:97–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void Int::ModDouble() {
98 mpz_t p;
99 mpz_add(num,num,num);
100 mpz_init_set(p,num);
101 mpz_sub(p,p,_P.num);
102 if(mpz_cmp_ui(p,0) > 0) {
103 mpz_set(num,p);
104 }
105 mpz_clear(p);
106}
107
108void Int::ModSqrt() {
109 mpz_sqrt(num,num);

Callers 1

DoubleMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected