IEEE 754 is the most common & widely used floating-point standard, notably the single-precision binary32 aka float and double-precision binary64 aka double formats.
IEEE 754 is the Institute of Electrical and Electronics Engineers standard for floating-point computation, and is the most common & widely used implementation thereof.
- Wikipedia on IEEE 754 (2008)
- ieee.org documentation
- https://en.wikipedia.org/wiki/Single-precision_floating-point_format aka
binary32
, usually calledfloat
orreal4
. Nice diagrams of the bit-pattern, and range over which it can represent every integer exactly, and so on. https://en.wikipedia.org/wiki/Double-precision_floating-point_format usually called
double
orreal8
Algorithm to convert an IEEE 754 double to a string? including the recent Ryū: fast float-to-string conversion
As well as formats, IEEE754 also defines the basic operations, +
-
*
/
and sqrt
, as producing correctly-rounded results (error <= 0.5ulp). Other functions like pow
and sin
are not required to be as accurate; that's an implementation choice between precision and performance.
This is why many CPU instruction sets only include the basic operations (including sqrt).