MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxBigInt_div2

Function fxBigInt_div2

modules/crypt/arith/xsBigIntEx.c:303–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303txBigInt *fxBigInt_div2(txMachine* the, txBigInt *q, txBigInt *a, txBigInt *b, txBigInt **r)
304{
305 q = fxBigInt_udiv(the, q, a, b, r);
306 if (a->sign) {
307 q->sign = !q->sign;
308 if (r != NULL) {
309 if (!fxBigInt_iszero(*r))
310 (*r)->sign = !(*r)->sign;
311 }
312 }
313 if (b->sign)
314 q->sign = !q->sign;
315 return(q);
316}
317
318txBigInt *fxBigInt_mod_mulinv_euclid(txMachine *the, txBigInt *r, txBigInt *a, txBigInt *m)
319{

Callers 1

Calls 2

fxBigInt_udivFunction · 0.85
fxBigInt_iszeroFunction · 0.85

Tested by

no test coverage detected