by petters · 7mo ago · 0 comments
It seems quite wastful to have two zeros when you only have 4 bits it total
+0
-0
+1
-1
+inf
-inf Bits s exp m Value
-------------------
0000 0 00 0 +0
0001 0 00 1 +0.5
0010 0 01 0 +1
0011 0 01 1 +1.5
0100 0 10 0 +2
0101 0 10 1 +3
0110 0 11 0 +inf
0111 0 11 1 NaN
1000 1 00 0 -0
1001 1 00 1 -0.5
1010 1 01 0 -1
1011 1 01 1 -1.5
1100 1 10 0 -2
1101 1 10 1 -3
1110 1 11 0 -inf
1111 1 11 1 NaN ± 0 (infinitesimal)
± 10^-2n
± 10^-n
± 1 (unity)
± 10^n
± 10^2n
± infinity
For fp4, this leaves 2 values. Maybe one of them should be NaN. What should the other one be?