Table of Contents

Search

  1. Preface
  2. Function reference
  3. Constants
  4. Operators
  5. Dates
  6. Functions
  7. System variables
  8. Datatype reference

Function Reference

Function Reference

LOG

LOG

Returns the logarithm of a numeric value.
Most often, you use this function to analyze scientific data rather than business data.

Syntax

LOG(
base
,
exponent
)
Argument
Required/
Optional
Description
base
Required
The base of the logarithm. Must be a positive numeric value other than 0 or 1. Any valid expression that evaluates to a positive number other than 0 or 1.
exponent
Required
The exponent of the logarithm. Must be a positive numeric value greater than 0. Any valid expression that evaluates to a positive number greater than 0.

Return Value

Double value.
NULL if a value passed to the function is NULL.

Example

The following expression returns the logarithm for all values in the NUMBERS column:
LOG( BASE, EXPONENT )
BASE
EXPONENT
RETURN VALUE
15
1
0
.09
10
-0.956244644696599
NULL
18
NULL
35.78
NULL
NULL
-9
18
None. (
Data Integration
writes the row to the error rows file.
)
0
5
None. (
Data Integration
writes the row to the error rows file.
)
10
-2
None. (
Data Integration
writes the row to the error rows file.
)
If you pass a negative number, 0, or 1 as a base value, or if you pass a negative value for the exponent,
Data Integration
writes the row to the error rows file.

0 COMMENTS

We’d like to hear from you!