The C++ standard does not discuss the underlying layout of float and double types, only the range of values they should represent. (This is also true for signed types, is i
The SQLite4 uses a new format to store doubles and floats
- It works reliably and consistently even on platforms that lack support for IEEE 754 binary64 floating point numbers.
- Currency computations can normally be done exactly and without rounding.
- Any signed or unsigned 64-bit integer can be represented exactly.
- The floating point range and accuracy exceed that of IEEE 754 binary64 floating point numbers.
- Positive and negative infinity and NaN (Not-a-Number) have well-defined representations.
Sources:
https://sqlite.org/src4/doc/trunk/www/design.wiki
https://sqlite.org/src4/doc/trunk/www/decimal.wiki