64-bit floating-point numbers.
Float
corresponds to the IEEE 754 binary64 format (double
in C or f64
in Rust).
Floating-point numbers are a finite representation of a subset of the real numbers, extended with
extra βsentinelβ values that represent undefined and infinite results as well as separate positive
and negative zeroes. Arithmetic on floating-point numbers approximates the corresponding operations
on the real numbers by rounding the results to numbers that are representable, propagating error and
infinite values.
Floating-point numbers include subnormal numbers. Their special values are:
-
NaN
, which denotes a class of βnot a numberβ values that result from operations such as dividing zero by zero, and -
Inf
and-Inf
, which represent positive and infinities that result from dividing non-zero values by zero.