Download Print this page

Appendix 5.2 Rounding; Appendix 5.3 Exceptions - Renesas M32R-FPU Software Manual

32-bit risc single-chip microcomputer

Advertisement

APPENDICES

Appendix 5.2 Rounding

The following 4 rounding modes are specified by IEEE754.
Appendix Table 5.2.1 Four Rounding Modes
Rounding Mode
Round to Nearest (default)
Round toward –Infinity
Round toward +Infinity
Round toward 0
• "Round to Nearest" is the default mode and produces the most accurate value.
• "Round toward –Infinity," "Round toward +Infinity" and "Round toward Zero" are used
for interval arithmetic to insure precision

Appendix 5.3 Exceptions

IEEE754 allows the following 5 exceptions. The floating-point status register is used to
determine whether the EIT process will be executed when an Exception occurs.
(1) Overflow Exception (OVF)
The exception occurs when the absolute value of the operation result exceeds the
largest describable precision in the floating-point format. Appendix Table 5.3.1 shows
the operation results when an OVF occurs.
Appendix Table 5.3.1 Operation Result due to OVF Exception
Rounding Mode
–Infinity
+Infinity
0
Nearest
Note : • When the Underflow Exception Enable (EU) bit (FPSR register bit 18) = "0"
• When the Underflow Exception Enable (EU) bit (FPSR register bit 18) = "1"
Assuming an infinite range of precision, round to the best
approximation of the result. Round an interval arithmetic
result to an even number.
Round to the smaller magnitude of the result.
Round to the larger magnitude of the result.
Round to the smaller in magnitude of the absolute value
of the result.
Sign of Result
when the OVF EIT
processing is masked
+
+MAX
–Infinity
+
+Infinity
–MAX
+
+MAX
–MAX
+
+Infinity
–Infinity
APPENDICES-20
Appendix 5 IEEE754 Specification Overview
Operation
Result
when the OVF EIT
processing is executed
round (x2 ^ -a)
a = 192 (single-precision)
a = 1536 (double-precision)
M32R-FPU Software Manual (Rev.1.01)
APPENDIX 5

Advertisement

loading