##### Page tree

Release 5.1

Contents:

Scheduled Maintenance: docs.trifacta.com will be offline for maintenance at 3:00pm UTC on Thursday March 30 for about 15 minutes.

Computes the natural logarithm of an input value. The value can be a Decimal or Integer literal or a reference to a column containing numeric values.
• The natural logarithm of a value is the value of ex such that is the input value.

## Basic Usage

Numeric literal example:

`derive type:single value: LN(10)`

Output: Generates a column containing the value X, such that  ex, is 10. This value is approximately `2.302585092994046`.

Column reference example:

`derive type:single value: LN(MyValue) as: 'ln_MyValue'`

Output: Generates the new `ln_MyValue` column containing the power to which e is raised to yield the value in the `MyValue` column.

## Syntax and Arguments

`derive type:single value: LN(numeric_value)`

ArgumentRequired?Data TypeDescription
numeric_valueYstring, decimal, or integerName of column or Decimal or Integer literal to apply to the function

### numeric_value

Name of the column or numeric literal, the natural logarithm of which is to be computed.

• Missing input values generate missing results.
• Literal numeric values should not be quoted. Quoted values are treated as strings.
• Multiple columns and wildcards are not supported.

Usage Notes:

Required?Data TypeExample Value
YesString (column reference) or Integer or Decimal literal`10`

## Examples

### Example - Exponential Functions

The following example demonstrates how the exponential functions work together. These functions include the following:

Source:

rowNumX
1-2
21
30
41
52
63
74
85

Transform:

`derive type:single value: EXP (X) as: 'expX'`

`derive type:single value: LN (expX) as: 'ln_expX'`

`derive type:single value: LOG (X) as: 'logX'`

`derive type:single value: POW (10,logX) as: 'pow_logX'`

Results:

In the following, `(null value)` indicates that a null value is generated for the computation.

rowNumXexpXln_expXlogXpow_logX
1-20.1353352832366127-2(null value)(null value)
2-10.1353352832366127-0.9999999999999998(null value)(null value)
3010(null value)0
412.718281828459045101
527.389056098930649520.301029995663981141.9999999999999998
6320.08553692318766830.477121254719662443
7454.5981500331442340.60205999132796233.999999999999999
85148.4131591025765750.69897000433601874.999999999999999

• Page:
• Page:
• Page:
• Page:
• Page:
• Page:
• Page:
• Page:
• Page:
• Page: