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

Function fxBigInt_div

xs/sources/xsBigInt.c:1718–1733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1716}
1717
1718txBigInt *fxBigInt_div(txMachine* the, txBigInt *q, txBigInt *a, txBigInt *b)
1719{
1720#ifndef mxCompile
1721 if (fxBigInt_iszero(b))
1722 mxRangeError("zero divider");
1723#endif
1724 q = fxBigInt_udiv(the, q, a, b, C_NULL);
1725 if (!fxBigInt_iszero(q)) {
1726 if (a->sign)
1727 q->sign = !q->sign;
1728 if (b->sign)
1729 q->sign = !q->sign;
1730 }
1731 mxBigInt_meter(q->size);
1732 return(q);
1733}
1734
1735txBigInt *fxBigInt_mod(txMachine* the, txBigInt *r, txBigInt *a, txBigInt *b)
1736{

Callers

nothing calls this directly

Calls 2

fxBigInt_iszeroFunction · 0.85
fxBigInt_udivFunction · 0.85

Tested by

no test coverage detected