Bfloat16 floating-point format
The bfloat16 (Brain Floating Point) floating-point format is a computer number format occupying 16 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point. This format is a truncated (16-bit) version of the 32-bit IEEE 754 single-precision floating-point format (binary32) with the intent of accelerating machine learning and near-sensor computing. It preserves the approximate dynamic range of 32-bit floating-point numbers by retaining 8 exponent bits, but supports only an 8-bit precision rather than the 24-bit significand of  the binary32 format. More so than single-precision 32-bit floating-point numbers, bfloat16 numbers are unsuitable for integer calculations, but this is not their intended use. Bfloat16 is used to reduce the storage requirements and increase the calculation speed of machine learning algorithms. The bfloat16 format was developed by Google Brain, an artificial intelligence research group at Google. The bfloat16 format is utilized in Intel AI processors, such as Nervana NNP-L1000, Xeon processors (AVX-512 BF16 extensions), and Intel FPGAs, Google Cloud TPUs, and TensorFlow. ARMv8.6-A, AMD ROCm, and CUDA also support the bfloat16 format. On these platforms , bfloat16 may also be used in mixed-precision arithmetic, where bfloat16 numbers may be operated on and expanded to wider data types. bfloat16 floating-point format. bfloat16 has the following format: The bfloat16 format, being a truncated IEEE 754 single-precision 32-bit float, allows for fast conversion to and from an IEEE 754 single-precision 32-bit float; in conversion to the bfloat16 format, the exponent bits are preserved while the significand field can be reduced by truncation (thus corresponding to round toward 0), ignoring the NaN special case. Preserving the exponent bits maintains the 32-bit float's  range of ≈ 10 to ≈ 3 × 10. The bits are laid out as follows: Exponent encoding. The bfloat16 binary floating-point exponent is encoded using an offset-binary representation, with the zero offset being 127; also known as exponent bias in the IEEE 754 standard. Thus, in order to get the true exponent as defined by the offset-binary representation, the offset of 127 has to be subtracted from the value of the exponent field. The minimum and maximum values of the exponent field (00 and FF) are interpreted specially, like in the IEEE 754 standard formats. The  minimum positive normal value is 2 ≈ 1.18 × 10 and the minimum positive (subnormal) value is 2 = 2 ≈ 9.2 × 10. Encoding of special values. Positive and negative infinity. Just as in IEEE 754, positive and negative infinity are represented with their corresponding sign bits, all 8 exponent bits set (FF) and all significand bits zero. Explicitly, val s_exponent_signcnd +inf = 0_11111111_0000000 -inf = 1_11111111_0000000 Not a Number. Just as in IEEE 754, NaN values are represented with either sign bit, all 8 exponent bits set (FF) and not all significand bits zero. Explicitly, val s_exponent_signcnd  +NaN = 0_11111111_klmnopq -NaN = 1_11111111_klmnopq where at least one of "k, l, m, n, o, p," or "q" is 1. As with IEEE 754, NaN values can be quiet or signaling, although there are no known uses of signaling bfloat16 NaNs as of September 2018. Range and precision. Bfloat16 is designed to maintain the number range from the 32-bit IEEE 754 single-precision floating-point format (binary32), while reducing the precision from 24 bits to 8 bits. This means that the precision is between two and three decimal digits, and bfloat16 can represent finite values up to  about 3.4 × 10. Examples. These examples are given in bit "representation", in hexadecimal and binary, of the floating-point value. This includes the sign, (biased) exponent, and significand. The maximum positive finite value of a normal bfloat16 number is 3.38953139 × 10, slightly below (2 − 1) × 2 × 2 = 3.402823466 × 10, the max finite positive value representable in single precision. Zeros and infinities. 0000 = 0 00000000 0000000 = 0 Special values. 4049 = 0 10000000 1001001 = 3.140625 ≈ π ( pi ) NaNs. ffc1 = x 11111111 1000001 => qNaN Bfloat16 floating-point format