LOG Function [Numeric]

Returns the natural logarithm of a number.

LN is an alias of LOG.

Syntax

LOGnumeric-expression )

Parameters

Parameters

Parameter

Description

numeric-expression

The number.

Returns

This function converts its argument to DOUBLE, performs the computation in double-precision floating point, and returns a DOUBLE as the result. If the parameter is NULL, the result is NULL.

Standards and Compatibility

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Compatible with Adaptive Server Enterprise.

Example

The following statement returns the value 3.912023:

SELECT LOG( 50 ) FROM iq_dummy
Related reference
LN Function [Numeric]
LOG10 Function [Numeric]