LN

Computes the natural logarithm ln(x)ln(x) where xx is the given input.

Syntax

LN(X)

Arguments

X

Type: numeric

A numeric value.

Returns

Type: double

The natural logarithm of X.

Note that if x0x \leq 0, then the function returns a null value.

Examples

XOutput

1

0.0

0

null

2

0.6931471805599453

0.5

-0.6931471805599453

4 * 5

2.995732273553991

Transformation job example

SQL

CREATE JOB function_operator_example
    ADD_MISSING_COLUMNS = true	
    AS INSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAME
    SELECT 
        LN(1) AS ln_example
    FROM default_glue_catalog.upsolver_samples.orders_raw_data 
    WHERE time_filter()
    LIMIT 1;

Query result

ln_example

0.0

Last updated