in reply to Re^5: Introspection into floats/NV
in thread Introspection into floats/NV
That's completely wrong [Update: except the bit on endianness].
See Mini-Tutorial: Formats for Packing and Unpacking Numbers.
d is a double
It is likely to be an IEEE 754 double-precision float, but it might not be.
f is a float
It is likely to be an IEEE 754 single-precision float, but it might not be.
F is an NV
It is likely to be an IEEE 754 double-precision float.
It is possibly an IEEE 754 quad-precision float.
It's unlikely to be an IEEE 754 single-precision float.
It's conceivable for it to be an Intel 80-bit extended precision float.
It might be none of those.
An IEEE 754 quad-precision float will be 128 bits in size and have 133 bits of precision (or less for subnormals).
An IEEE 754 double-precision float will be 64 bits in size and have 53 bits of precision (or less for subnormals).
An IEEE 754 single-precision float will be 32 bits in size and have 24 bits of precision (or less for subnormals).
An Intel 80-bit extended precision float will be at least 80 bits in size and have 64 bits of precision (or less for subnormals).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: Introspection into floats/NV
by karlgoethebier (Abbot) on Jun 04, 2025 at 19:16 UTC | |
by ikegami (Patriarch) on Jun 04, 2025 at 19:18 UTC |