User:BZAW31559/sandbox/floatingpointimprecision

0.1 + 0.2 = ? in single precision
$$0.1 = \frac{\mathrm{round}(0.1 \times 2^{27})}{2^{27}} = 0.100000001490116119384765625 \approx 0.1$$

$$0.2 = \frac{\mathrm{round}(0.2 \times 2^{26})}{2^{26}} = 0.20000000298023223876953125 \approx 0.2$$

$$0.1 + 0.2 = \frac{\mathrm{round}(0.1 \times 2^{27})}{2^{27}} + \frac{\mathrm{round}(0.2 \times 2^{26})}{2^{26}} = 0.300000004470348358154296875 \approx 0.3$$

2^-24 in decimal32 loses the number of digits?
2^-24 in decimal32 loses the number of digits?
 * Yes, the decimal32 floating-point format only supports 7 decimal digits, but the half precision of this value is correct and can fit this value exactly. –BZAW31559 (talk) 07:30, 4 May 2019 (UTC)

See math: $$2^{-24} = \frac{\mathrm{round}(2^{-24} \times 10^{14})}{10^{14}} = 0.00000005960464 \approx 0.000000059604644775390625$$

2-bit data type
There are no significand or mantissa bits in this format. Only sign bit and combination bit.