Natural logarithm: ln

Syntax

ln ( op )

Input parameters

op

the operand

Examples of valid syntaxes

ln ( DS_1 )
ln ( 148 )

Semantics for scalar operations

The operator ln calculates the natural logarithm of a number. For example:

ln ( 148 ) gives 4.997...
ln ( e ) gives 1.0
ln ( 1 ) gives 0.0
ln ( 0.5 ) gives -0.693...

Input parameters type

op

dataset { measure<number [value > 0] > _+ }
| component<number [value > 0] >
| number [value > 0]

Result type

result

dataset { measure<number> _+ }
| component<number>
| number

Additional Constraints

None.

Behaviour

The operator has the behaviour of the “Operators applicable on one Scalar Value or Data Set or Data Set Component” (see the section “Typical behaviours of the ML Operators”).

Examples

Given the operand dataset DS_1:

Input DS_1 (see structure)

Id_1

Id_2

Me_1

Me_2

10

A

148.413

0.7545

10

B

2980.95

13.45

11

A

7.38905

1.87

Example 1

DS_r := ln(DS_1);

results in (see structure):

DS_r

Id_1

Id_2

Me_1

Me_2

10

A

5.0

-0.2817

10

B

8.0

2.598979

11

A

2.0

0.625938

Example 2

DS_r := DS_1 [ calc Me_2 := ln ( Me_1 ) ];

results in (see structure):

DS_r

Id_1

Id_2

Me_1

Me_2

10

A

148.413

5.0

10

B

2980.95

8.0

11

A

7.38905

2.0