Scalar function
DOUBLE returns NULL for NULL input or a non-finite logarithm result (including zero, negative input, NaN or positive infinity). FLOAT input preserves NULL but retains non-finite computed results.
Syntax
Scalar
Arguments
Returns
- Type: DOUBLE; FLOAT when the input is evaluated as FLOAT
- Possible values: Finite real logarithms for positive finite DOUBLE input.
- NULL behavior: DOUBLE returns NULL for NULL input or a non-finite logarithm result (including zero, negative input, NaN or positive infinity). FLOAT input preserves NULL but retains non-finite computed results.
Properties
- Approximation bound: No fixed maximum error is guaranteed.
Usage notes
- INTEGER and INT mean the same type; STRING means VARCHAR text. NULL can be used with a supported type. Cast NULL explicitly when its type would otherwise be unclear.
- Exact result: Floating-point computation can round the mathematical result.
Examples
Values below and above one
Results are rounded to six decimal places for display.
Limitations
- DOUBLE results that are NaN or infinite become NULL. FLOAT calculations retain NaN and infinity.
- Query tools may report DOUBLE even when the result is FLOAT. The reported type does not increase the result’s precision.
Last modified on October 15, 2026