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

Function fxBigInt_lsr

xs/sources/xsBigInt.c:1296–1313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1294}
1295
1296txBigInt *fxBigInt_lsr(txMachine* the, txBigInt *r, txBigInt *a, txBigInt *b)
1297{
1298 if (b->sign) {
1299 r = fxBigInt_ulsl1(the, r, a, b->data[0]);
1300 r->sign = a->sign;
1301 }
1302 else {
1303 if (a->sign) {
1304 r = fxBigInt_ulsr1(the, r, a, b->data[0]);
1305 if (b->data[0])
1306 r = fxBigInt_uadd(the, C_NULL, r, (txBigInt *)&gxBigIntOne);
1307 r->sign = 1;
1308 }
1309 else
1310 r = fxBigInt_ulsr1(the, r, a, b->data[0]);
1311 }
1312 return fxBigInt_fit(the, r);
1313}
1314
1315txBigInt *fxBigInt_ulsr1(txMachine* the, txBigInt *r, txBigInt *a, txU4 sw)
1316{

Callers

nothing calls this directly

Calls 4

fxBigInt_ulsl1Function · 0.85
fxBigInt_ulsr1Function · 0.85
fxBigInt_uaddFunction · 0.85
fxBigInt_fitFunction · 0.85

Tested by

no test coverage detected