benilla-re systems structs docs

__ZeroTail

function · crt · primitive

Address
0x40fa65 · 73 bytes, up to 0x40faad
Signature
int32_t __cdecl (const uint32_t *man, int32_t bit)
Meaning
Tests that every bit of a 96-bit mantissa after the given one is clear
Confidence
verified, proof two
Name from
the community database (idb)
Finding
crt/strtod#rounding-to-a-format
Test
crt::crt_ld12cvt_difftest, crt::crt_strtod_difftest

Finding: Rounding to a format in crt: reading numbers

__ld12cvt(x, out, format) rounds the 80-bit mantissa to the format's 53 or 24 bits, adding 1 at the last kept bit when the bit after it is set and so is any bit after the next one; those two bits alone never round up. A carry raises the exponent. At or below the minimum exponent, -1023 or -127, the unrounded mantissa is shifted into a subnormal, rounded and shifted one further, answering 2; below the minimum less the precision, -1076 or -151, it is zero, answering 2. An exponent of 1024 or 128 or more is the infinity, answering 1; a normal result answers 0. A zero exponent field gives zero, answering 2 unless the mantissa is zero.

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.