benilla-re systems structs docs

_strflt

struct · crt · 16 bytes

Meaning
Holds a double's sign, decimal exponent, digit return and digit text for the conversions
Confidence
verified, proof one
Finding
crt/decimal#the-digits-a-conversion-reads

Finding: The digits a conversion reads in crt: decimal digits

_fltout2(value, flt, buf) asks I10_OUTPUT for 17 digits with no flags of the double's 80-bit real, copies the digits into buf, and fills the _strflt at flt: the sign as - or a space, the decimal exponent (the value is 0.d1d2... * 10^decpt), the return of I10_OUTPUT, and buf. So -0 is 0 with sign space, and a NaN's sign is kept. A signalling NaN never reaches it as one: _cftoe, _cftof and _cftog copy the double with fld and fstp, and the x87 quiets a signalling NaN on the load, so 1#SNAN is never printed for a double.

The derivation is in the doc.

Fields 4

offsetsizetypenamemeaningconfidencefinding
0x00004int32_tsignHolds the sign as - or a spaceverified, proof onecrt/decimal#the-digits-a-conversion-reads
0x00044int32_tdecptHolds the decimal exponent: the value is 0.ddd times 10^decptverified, proof onecrt/decimal#the-digits-a-conversion-reads
0x00084int32_tflagHolds I10_OUTPUT's return, 0 for a non-finite valueverified, proof onecrt/decimal#the-digits-a-conversion-reads
0x000c4char *mantissaPoints to the digit textverified, proof onecrt/decimal#the-digits-a-conversion-reads