in the case of s2d("0.2316419", &d);
s2d calls mulShift64(m=2316419, mul = 9774590264567735146, j= j=92),
which calls shiftright128(lo=2525993831686973224, hi=242894, dist=28) ;
However in non 64 bit version of shiftright128, there is an assert(dist >32). Clearly with the value of 28, it asserts.
// Avoid a 64-bit shift by taking advantage of the range of shift values.
assert(dist >= 32);
return (hi << (64 - dist)) | ((uint32_t)(lo >> 32) >> (dist - 32));
in the case of s2d("0.2316419", &d); s2d calls mulShift64(m=2316419, mul = 9774590264567735146, j= j=92), which calls shiftright128(lo=2525993831686973224, hi=242894, dist=28) ;
However in non 64 bit version of shiftright128, there is an assert(dist >32). Clearly with the value of 28, it asserts. // Avoid a 64-bit shift by taking advantage of the range of shift values. assert(dist >= 32); return (hi << (64 - dist)) | ((uint32_t)(lo >> 32) >> (dist - 32));
shiftright128 returns the wrong value.