Section 6 Floating-Point Unit
SH7751 Group, SH7751R Group
Page 188 of 1128
R01UH0457EJ0301 Rev. 3.01
Sep 24, 2013
Example:
If the double-precision FSUB instruction (FSUB DR0, DR2) is executed with input
data DR0 = H'C1F00000 80000000, DR2 = H'C4B250D2 0CC1FB74, and FPSCR = H'000C0001,
the correct operation result is DR2 = H'C4B250D2 0CC1F973, and FPSCR.Flag.I and
FPSCR.Cause.I should be set to 1. However, the result actually produced by the FPU is DR2 =
H'C4B250D2 0CC1F974, and FPSCR.Flag.I and FPSCR.Cause.I are not set to 1.
Effects:
In addition to the problem described above, the numerical size of the result of the
operation may contain a minute operation error equivalent to 1/256 of the LSB of the mantissa of
the unrounded value. This is can be described as within the scope of the subsequent rounding
mechanism. Strictly speaking, it consists of the following.
a: The infinite-precision operation result
b: The closest expressible value less than
a
c: The closest expressible value greater than
a
d: The operation result when
a
is rounded correctly
e: The operation result when
a
is rounded by the FPU
•
The rounding error when rounding is performed correctly in Round to Nearest mode is:
0
≤
|
d
−
a
|
≤
(1/2)
×
(c
−
b
)
And the rounding error when rounding is performed by the FPU is:
0
≤
|
e
−
a
|
<
(129/256)
×
(
c
−
b
)
If
c
–
b
is considered the LSB of the mantissa, the range of rounding error is equivalent to
1/256 of the LSB of the mantissa of the correctly rounded value.
•
The rounding error when rounding is performed correctly in Round to Zero mode is:
(
−
1)
×
(c
−
b) <
|
d
|−|
a
|
≤
0
And the rounding error when rounding is performed by the FPU is:
(
−
1)
×
(c
−
b) <
|
e
|−|
a
|
<
(1/256)
×
(c
−
b)
If
c
–
b
is considered the LSB of the mantissa, the range of rounding error is equivalent to
1/256 of the LSB of the mantissa of the correctly rounded value.