Skip to main content
Scalar function
Returns NULL for NULL input or input less than or equal to -1, including negative infinity.

Syntax

Scalar

Arguments

Returns

  • Type: DOUBLE
  • Possible values: Real logarithms for input greater than -1; NaN and positive infinity propagate.
  • NULL behavior: Returns NULL for NULL input or input less than or equal to -1, including negative infinity.

Properties

  • Approximation bound: No fixed maximum error is guaranteed.

Usage notes

  • The calculation preserves precision for values close to zero.
  • 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

Zero, domain boundary and NULL input

Positive and negative inputs

Results are rounded to six decimal places for display.
Last modified on October 15, 2026