LOG() returns the logarithm of a number in the specified base. If no base is specified, LOG() uses a default base of ten. If the input is invalid (e.g., negative numbers, zero, or invalid base), the function returns zero. This function is useful for mathematical calculations, scientific computations, and data analysis.
LOG(number [, base])
LOG() returns a numeric value
LOG(10) = 1 (log base 10 of 10)
LOG(10, 2) = 3.3219 (log base 2 of 10)
LOG(1024, 2) = 10 (log base 2 of 1024)
LOG(1, 0) = 0 (invalid base)
LOG(100) = 2 (log base 10 of 100)
LOG(8, 2) = 3 (log base 2 of 8)
LOG(0) = 0 (invalid input)
LOG(-1) = 0 (invalid input)
LOG(NULL) = NULL (NULL input)