DOUBLE
type
Applies to: Databricks SQL Databricks Runtime
Represents 8-byte double-precision floating point numbers.
Limits
The range of numbers is:
-∞ (negative infinity)
-1.79769E+308 to -2.225E-307
0
+2.225E-307 to +1.79769E+308
+∞ (positive infinity)
NaN (not a number)
Literals
decimal_digits { D | exponent [ D ] }
| digit [ ... ] { exponent [ D ] | [ exponent ] D }
decimal_digits:
[ + | - ] { digit [ ... ] . [ digit [ ... ] ]
| . digit [ ... ] }
exponent:
E [ + | - ] digit [ ... ]
digit
: Any numeral from 0 to 9.
The D
postfix and E
exponent are case insensitive.
Notes
DOUBLE 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.