floating-point in MySQL

Type | Storage size 
--- | --- 
float | 4 byte 
double | 8 byte 

You can specify explicit precision and scale values in the column definition to indicate the number of significant digits and the number of decimal places to the right of the decimal point. The following definitions specify a single-precision column with a precision of 10 digits and scale of 3 decimals, and a double-precision column with a precision of 20 digits and scale of 7 decimals:
```
weight FLOAT(10,3)
avg_score DOUBLE(20,7)
```
If you specify no precision or scale, MySQL represents values stored in FLOAT and DOUBLE columns to the maximum accuracy allowed by the hardware of the MySQL server host. The following definitions include no explicit precision or scale:
```
float_col FLOAT
double_col DOUBLE
```
Floating-point values are stored using mantissa/exponent representation, which means that the precision is defined by the width of the mantissa and the scale varies depending on the exponent value. The result of these factors is that stored values are approximate.