LOG

Represents the SQLite LOG() function, which computes the logarithm of a number.

This function can be called in two ways:

  1. LOG(X): Computes the base-10 logarithm of X. This is equivalent to LOG10(X).

  2. LOG(B, X): Computes the logarithm of X to the base B.

The inputs X and B (if provided) must be positive numbers.

Return

A KQLiteColumn with the result of the logarithm. Returns null if the inputs are null or invalid (e.g., non-positive).

Author

MOHAMMAD AZIM ANSARI

Parameters

x

The column containing the number whose logarithm is to be computed. Must be positive.

base

The column for the logarithm base. If null, base 10 is used. Must be positive.

See also