Half-Precision Floating-Point, Visualized
observablehq.com
observablehq.com
I'm not usually a fan of interactive plots but I think the one in this article works. It's cool to hover over individual areas and see the significand, exponent and sign bit listed for different values.
https://dev.mysql.com/doc/refman/8.0/en/floating-point-types...
Some people will expect it to be double precision (e.g. Python programmers) whereas others will expect it to be single precision (e.g. C/C++ programmers).
mysql> create table t(f float);
Query OK, 0 rows affected (0.02 sec)
mysql> insert into t(f) values (999999),(1000000),(1000001);
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> select distinct f from t;
+---------+
| f |
+---------+
| 999999 |
| 1000000 |
| 1000000 |
+---------+
3 rows in set (0.00 sec)
mysql>