Polybench® Reference
Truncates floating point samples to the nearest integer towards zero

Truncate

Overview

Use this operator to convert floating point sample values to integer values towards zero.

Examples: 2.3 becomes 2;
2.9 also becomes 2.

Operator ports

Input S: Floating point values

Output S_int: Floating point values

Properties

Find more information about changing properties here: "Properties Viewer"

Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.', '$' nor '@' characters.

For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".

Documentation
type: See description
Optional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.

Details


Examples

Example: Round and Truncate Demo
Demonstrates the Round and Truncate operators and shows the difference between the two.
Examples\DF0407016_001_Truncate_Demo.xmc