Fixed-point Data Type

The fixed-point data type is implemented in MLDesigner by the Fix class.

The Fix class supports a two’s complement representation of a finite precision number. In fixed-point notation, the partition between the integer part and the fractional part, the binary point, lies at a fixed position in the bit pattern. Its position represents a trade-off between precision and range. If the binary point lies to the right of all bits, then there is no fractional part.

The Fix type is still experimental.

Constructing fixed-point variables

Variables of type Fix are defined by specifying the word length and the position of the binary point.

Fixed-point parameter

Parameter variables can be declared as Fix or FixArray.

Fixed-point inputs and outputs

Fix types are available in MLDesigner as a type of Particle.

Assignment and overflow handling

When assigning one Fix object to another with different precission, an overflow might occur. These overflows are handled by the assignment operator.

Constructors

Functions to set or display information about the Fix number

Comparison function

Operators

Conversions

Fix overflow, rounding, and errors