Log (FPScript)

21.09.2021

Calculates the logarithm to the base e (natural logarithm).

Syntax

Log(Number)

 

The syntax of the Log function consists of the following parts:

Part

Description

Number

The number for which the logarithm is to be calculated. For aggregate data structures, the logarithm of the Y component is calculated.

All data structures are allowed. All numeric data types are permitted, except calendar time und time span.

Remarks

The result has the same structure as the argument Number. The calculation is done element by element where appropriate.

The result has the unit 1, if Number has a unit. Otherwise, it has no unit.

The real logarithm function is calculated for a real argument. Number must then be positive. For each negative Number value, the function returns a void value. The result is of the 64-bit floating point value data type. The following illustration shows the course of the function:

If Number is complex, then the complex logarithm function is calculated. The result is then of the complex 64-bit floating point value data type. The following illustration shows the course of the absolute value of the function:

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

Available in

FlexPro Basic, Professional, Developer Suite

Examples

Log(1.)

Results in 0.

Log(E)

Results in 1.

Log(-1.)

Results in ?.

Dim x
x = Series(0, 5, 0.1)
Signal(Log(x), x)
 

Calculates a signal with the course of the curve in the interval [0, 5].

See Also

Exp Function

Log10 Function

Exponentiation Operator (^)

Share article or send as email:

You might be interested in these articles