Engee documentation

Unary Minus

Page in progress.

Inverts the input signal.

blockType: UnaryMinus

Path in the library:

/Basic/Math Operations/Unary Minus

Description

The Unary Minus block changes the sign of the input signal.

Ports

Input

# IN_1 — input signal
scalar | vector | matrix

Details

Input signal as a scalar, vector or matrix.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64.

Complex numbers support

No

Output

# OUT_1 — output signal
scalar | vector | matrix

Details

Input signal taken with the opposite sign. The output data has the same data type and dimensionality as the input.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64.

Complex numbers support

No

Parameters

Parameters

# Saturate on integer overflow — method of action in case of overflow
Logical

Details

When this check box is selected, the value that goes beyond the type limits is reset to the maximum or minimum value that the selected data type can represent. Otherwise, overflow transfer occurs.

When this option is selected, saturation is applied to all internal operations in the block, not just to the output or result. In general, the code generation process can determine when overflow is not possible. In this case, the code generator does not generate a saturation code.

For signed, integer data types, the unary minus of the largest negative value cannot be represented by this data type. In this case, the checkbox Saturate on integer overflow controls the behavior of the block:

Parameter Setting Block behavior Examples

The flag Saturate on integer overflow installed (enabled)

The values are saturated to the largest positive value of the integer data type.

For signed 8-bit integers` '-128` corresponds to 127'.

For signed `16-bit integers` '-32768` corresponds to 32767'.

For signed `32-bit integers` '-2147483648` corresponds to `2147483647'.

The flag Saturate on integer overflow removed (disabled)

Values are carried over to the largest negative value of the integer data type.

For signed 8-bit integers, -128 remains -128'.

For signed `16-bit integers, -32768 remains -32768'.

For signed `32-bit integers, -2147483648 remains `-2147483648'.

Default value

false (switched off)

Program usage name

SaturateOnIntegerOverflow

Tunable

No

Evaluatable

No

Additional options

C code generation: Yes