Absolute (FPScript)

21.09.2021

Forms the absolute value of real numbers, complex numbers or time spans.

Syntax

Absolute(Number)

 

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

Part

Description

Number

The real number, complex number or time span for which the absolute value is determined.

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

Remarks

The result has the same structure and unit as the argument Number.

For aggregate structures, only the Y component is considered.

If Number is real, then the result is of the same data type. Otherwise, the result is of the corresponding real data type for the complex argument.

The absolute value of a complex number is defined as:

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 View, Basic, Professional, Developer Suite

Examples

Absolute(-3.5)

Results in 3.5.

Absolute((4.0, 3.0))

Results in 5.0.

Absolute(-'1:30')

Results in '1:30:00'.

Absolute((1n, 1n))

Results in 1. Result is not 1.414213 because the argument, and thus also the result, is a 32-bit integral data type.

See Also

Phase Function

PolarTransform Function

Share article or send as email:

You might be interested in these articles