| 1749 | } |
| 1750 | |
| 1751 | txBigInt *fxBigInt_rem(txMachine* the, txBigInt *r, txBigInt *a, txBigInt *b) |
| 1752 | { |
| 1753 | txBigInt *q; |
| 1754 | #ifndef mxCompile |
| 1755 | if (fxBigInt_iszero(b)) |
| 1756 | mxRangeError("zero divider"); |
| 1757 | #endif |
| 1758 | mxBigInt_meter(((a->size - b->size) * (a->size + b->size))); |
| 1759 | if (r == NULL) |
| 1760 | r = fxBigInt_alloc(the, MIN(a->size, b->size)); |
| 1761 | q = fxBigInt_udiv(the, NULL, a, b, &r); |
| 1762 | if (a->sign) { |
| 1763 | if (!fxBigInt_iszero(r)) |
| 1764 | r->sign = !r->sign; |
| 1765 | } |
| 1766 | fxBigInt_free(the, q); |
| 1767 | mxBigInt_meter(r->size); |
| 1768 | return(r); |
| 1769 | } |
| 1770 | |
| 1771 | static void fxBigInt_makepoly(txBigInt *r, txBigInt *a, int t) |
| 1772 | { |
nothing calls this directly
no test coverage detected