Engee documentation

Sqrt

Calculates the square root, the square root with sign, or the inverse of the square root.

blockType: Sqrt

Reciprocal Square Root

Path in the library:

/Basic/Math Operations/Reciprocal Square Root

SignedSqrt

Path in the library:

/Basic/Math Operations/SignedSqrt

Sqrt

Path in the library:

/Basic/Math Operations/Sqrt

Description

The Sqrt block calculates the square root, the square root with sign, or the inverse of the square root of the input signal.

The function calculated by the block and the block icon depend on the value of the parameter Function.

Parameters value Function Description Mathematical expression Block icon

sqrt

Square root of the input signal

sqrt

signedSqrt

Square root of the absolute value of the input signal multiplied by the sign of the input signal

signed sqrt

rSqrt

The inverse of the square root of the input signal

reciprocal sqrt

Ports

Input

# IN_1 — input signal
scalar | vector | matrix

Details

Input signal for calculating the square root, the square root with sign or the inverse of the square root.

Data types

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

Complex numbers support

Yes

Output

# OUT_1 — output signal
scalar | vector | matrix

Details

An output signal representing the value of a square root, a square root with sign, or the inverse of a square root calculated from an input signal.

If the input signal is of integer type, the output signal must be of floating point type.

Data types

Float64.

Complex numbers support

No

Parameters

Parameters

# Function — function that the block performs
sqrt | signedSqrt | rSqrt

Details

The mathematical function that the block calculates. The block icon changes according to the selected function.

Values

sqrt | signedSqrt | rSqrt

Default value

Program usage name

Operator

Tunable

No

Evaluatable

No

# Output signal type — output signal type
auto | real | complex

Details

Specify the output signal type in the Math Function block as auto, real or complex.

Function

Input signal type

Output signal type

auto

real

complex

sqrt

real

real for non-negative inputs

NaN for negative inputs

real for non-negative inputs

NaN for negative inputs

complex

`complex

`complex

error

complex

signedSqrt

real

real

real

`complex

complex

`error

`error

error

rSqrt

real

real

real

error

complex

`error

`error

error

Values

auto | real | complex

Default value

auto

Program usage name

OutputSignalType

Tunable

No

Evaluatable

No

Additional options

C code generation: Yes