# Float Data Types
__*FLOAT data type*__
__*DOUBLE DATA TYPE*__
+ Used for approximations: integers, decimals, or both
+ Data Type:
  + `FLOAT`: Stores a single precision value using four bytes
  + `DOUBLE`: Uses eight bytes to store double values

------------------------------------------------------------
Note:
As in MySQL, the FLOAT data type stores approximations. For currency equivalents, it is recommended to use the DECIMAL type instead. In TiDB, the default precision for FLOAT data types is 8 bits, but in MySQL, the default precision is 6 bits. For example, if you insert 123456789 and 1.23456789 into a FLOAT column in TiDB and MySQL, you get 123457000 and 1.234579 when you query the corresponding values in MySQL, and in TiDB, you get 123456790 and 1.2345679.

- TiDB supports all floating point types in MySQL, including FLOAT and DOUBLE

- column Description:
- M Total number of decimal places
- Number of decimal places in D
- UNSIGNED is an unsigned number, or a signed number if this is not added
- ZEROFILL zero-padding logo. If there is this logo, TiDB will automatically give the type- Add the UNSIGNED logo

- FLOAT type
  - Single precision float number. Allowed values range from -2^128 to +2^128, that is, -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38. These are theoretical limitations based on the IEEE standard. The actual range may be slightly smaller depending on the hardware or operating system.
  - In the FLOAT (p) type, p indicates precision (in digits). Use only this value to determine whether the data type of the result column is FLOAT or DOUBLE. If p is from 0 to 24, the data type changes to FLOAT with no M or D values. If p is from 25 to 53, the data type changes to DOUBLE with no M or D values. The resulting column range is the same as the single-precision FLOAT or double-precision DOUBLE data type described earlier in this section.

- DOUBLE TYPE
  - Double precision float number, alias DOUBLE PRECISION. Allowed values range from -2^1024 ~ +2^1024, that is, -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+ 308 These are theoretical limitations based on the IEEE standard. The actual range may be slightly smaller depending on the hardware or operating system.
```
DOUBLE[(M,D)] [UNSIGNED] [ZEROFILL]
DOUBLE PRECISION [(M,D)] [UNSIGNED] [ZEROFILL], REAL[(M,D)] [UNSIGNED] [ZEROFILL]
```
- WARNING:
  - As in MySQL, the DOUBLE data type stores approximations. For precise values such as currency, the DECIMAL type is recommended.
