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

Function fxBigInt_add

xs/sources/xsBigInt.c:1357–1372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1355 */
1356
1357txBigInt *fxBigInt_add(txMachine* the, txBigInt *rr, txBigInt *aa, txBigInt *bb)
1358{
1359 if ((aa->sign ^ bb->sign) == 0) {
1360 rr = fxBigInt_uadd(the, rr, aa, bb);
1361 if (aa->sign)
1362 rr->sign = 1;
1363 }
1364 else {
1365 if (!aa->sign)
1366 rr = fxBigInt_usub(the, rr, aa, bb);
1367 else
1368 rr = fxBigInt_usub(the, rr, bb, aa);
1369 }
1370 mxBigInt_meter(rr->size);
1371 return(rr);
1372}
1373
1374txBigInt *fxBigInt_dec(txMachine* the, txBigInt *r, txBigInt *a)
1375{

Callers 6

fxBigInt_mod_addFunction · 0.85
fxBigInt_mod_subFunction · 0.85
fxBigInt_incFunction · 0.85
fxBigInt_udivFunction · 0.85

Calls 2

fxBigInt_uaddFunction · 0.85
fxBigInt_usubFunction · 0.85

Tested by

no test coverage detected