The properties associated with quantizer
objects are described in the
following sections in alphabetical order.
Type of arithmetic used in quantization. This property can have the following values:
fixed
— Signed fixed-point calculations
float
— User-specified floating-point
calculations
double
— Double-precision floating-point
calculations
single
— Single-precision floating-point
calculations
ufixed
— Unsigned fixed-point calculations
The default value of this property is fixed
.
When you set the DataMode
property value to
double
or single
, the
Format
property value becomes read only.
Data format of a quantizer
object. The interpretation of this
property value depends on the value of the DataMode
property.
For example, whether you specify the DataMode
property with fixed-
or floating-point arithmetic affects the interpretation of the data format property. For
some DataMode
property values, the data format property is read
only.
The following table shows you how to interpret the values for the
Format
property value when you specify it, or how it is specified
in read-only cases.
DataMode Property Value | Interpreting the Format Property Values |
---|---|
| You specify the The word length can range from 2 to the limits of memory on your PC. The fraction length can range from 0 to one less than the word length. |
| You specify the The word length can range from 2 to the limits of memory on your PC. The exponent length can range from 0 to 11. |
| The |
| The |
Overflow-handling mode. The value of the OverflowMode
property can
be one of the following:
Saturate
— Overflows saturate.
When the values of data to be quantized lie outside the range of the largest and smallest representable numbers (as specified by the data format properties), these values are quantized to the value of either the largest or smallest representable value, depending on which is closest.
Wrap
— Overflows wrap to the range of representable
values.
When the values of data to be quantized lie outside the range of the largest and smallest representable numbers (as specified by the data format properties), these values are wrapped back into that range using modular arithmetic relative to the smallest representable number.
The default value of this property is Saturate
. This property
becomes a read-only property when you set the DataMode
property to
float
, double
, or
single
.
Note
Floating-point numbers that extend beyond the dynamic range overflow to
±inf
.
Rounding method. The value of the RoundingMode
property can be one
of the following:
Ceiling
— Round up to the next allowable quantized
value.
Convergent
— Round to the nearest allowable
quantized value. Numbers that are exactly halfway between the two nearest
allowable quantized values are rounded up only if the least significant bit
(after rounding) would be set to 0.
Zero
— Round negative numbers up and positive
numbers down to the next allowable quantized value.
Floor
— Round down to the next allowable quantized
value.
Nearest
— Round to the nearest allowable quantized
value. Numbers that are halfway between the two nearest allowable quantized
values are rounded up.
The default value of this property is Floor
.