Nios II Custom Instruction User Guide

ID 683242
Date 4/27/2020
Public
Document Table of Contents

5.3.4. Rounding Examples

The table below shows examples of the supported rounding schemes for decimal values assuming rounded normalized decimal values with two digits of precision, like one-digit integer or one-digit fraction.
Table 11.  Decimal Rounding Examples
Unrounded Value Nearest Rounding Truncation Rounding Faithful Rounding
3.34 3.3 3.3 3.3 or 3.4
6.45 6.5 6.4 6.4 or 6.5
2.00 2.0 2.0 2.0 or 2.1
8.99 9.0 8.9 8.9 or 9.0
-1.24 -1.2 -1.2 -1.2 or -1.3
-3.78 -3.8 -3.7 -3.7 or -3.8