LN

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the natural logarithm of a number.

Syntax 

1ln(<x>)

Arguments 

Required 

  • <x>: The value to evaluate.

Returns 

Returns the natural logarithm as a double precision value.

Considerations 

  • ln returns an error for zero or negative arguments.

Examples 

Compute a Natural Logarithm 

Get the natural logarithm of a value.

1SELECT ln(2.0) AS result;

Returns 0.693147180559945.

Natural Logarithm of 1 

The natural logarithm of 1 is 0.

1SELECT ln(1) AS result;

Returns 0.

Related Documentation