_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
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 4 | int32_t | sign | Holds the sign as - or a space | verified, proof one | crt/decimal#the-digits-a-conversion-reads |
0x0004 | 4 | int32_t | decpt | Holds the decimal exponent: the value is 0.ddd times 10^decpt | verified, proof one | crt/decimal#the-digits-a-conversion-reads |
0x0008 | 4 | int32_t | flag | Holds I10_OUTPUT's return, 0 for a non-finite value | verified, proof one | crt/decimal#the-digits-a-conversion-reads |
0x000c | 4 | char * | mantissa | Points to the digit text | verified, proof one | crt/decimal#the-digits-a-conversion-reads |