Because single precision numbers use only 32 bits, they require
less memory than double-precision numbers while still offering many
of the benefits of floating point arithmetic. The half-precision
data type occupies only 16 bits of memory, but its floating-point
representation enables it to handle wider dynamic ranges than
integer or fixed-point data types of the same size. You can use a
CustomFloat
object to define a floating-point numeric
data type with specified word length and mantissa length.
Representation and manipulation of floating-point numbers.
This example shows how to perform arithmetic and linear algebra with single precision data.