FLOAT
type
Applies to: Databricks SQL Databricks Runtime
Represents 4-byte single-precision floating point numbers.
Limits
The range of numbers is:
-∞ (negative infinity)
-3.402E+38 to -1.175E-37
0
+1.175E-37 to +3.402E+38
+∞ (positive infinity)
NaN (not a number)
Literals
decimal_digits [ exponent ] F
| [ + | - ] digit [ ... ] [ exponent ] F
decimal_digits:
[ + | - ] { digit [ ... ] . [ digit [ ... ] ]
| . digit [ ... ] }
exponent:
E [ + | - ] digit [ ... ]
digit
: Any numeral from 0 to 9.
The F
postfix and E
exponent are case insensitive.
Notes
FLOAT is a base-2 numeric type. When given a literal which is base-10 the representation may not be exact. Use DECIMAL type to accurately represent fractional or large base-10 numbers.