7-6
EPSOn
S5U1C17001C ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
7 liBrary
7.2.3 floating-point number Processing implementation Definition
The following processes are implementation-defined due to C language specifications. The package emulation
library handles them as described below.
floating-point value rounding method
In type conversion from integer type to floating-point type or from one floating-point type to another floating-
point type or in floating-point calculations, if the target value is halfway between two adjacent values
expressible by the intended format, whether the result is rounded to the larger value or smaller value is
implementation-defined.
This package is designed to round values to yield even numbers.
In other words, if the LSB of the value before rounding is 0, no rounding is performed. If the LSB is 1, the
value is rounded up by 1.
Conversion from floating-point type to integer type
In converting a floating-point number to an integral number, the fractional part will be truncated.
Following truncation, the action taken if the original value cannot be expressed in the intended format is
implementation-defined.
・
Conversion from single-/double-precision floating-point type to signed/unsigned long
If the original value is +NaN
→
0x0
if the intended format is signed or
0x80000000
if unsigned
If the original value is –NaN
→
0x0
If the original value is too large
→
Maximum value that can be expressed in the intended format
If the original value is too small
→
0x80000000
・
Conversion from single-/double-precision floating-point type to signed/unsigned long long
If the original value is +NaN
→
0x80000000 80000000
If the original value is –NaN
→
0x7fffffff 80000000
if the intended format is signed or
0x0
if
unsigned
If the original value is too large
→
0xffffffff ffffffff
If the original value is too small
→
0x1
if the intended format is signed or
0x0
if unsigned
Conversion from one floating-point type to another floating-point type
If the original value cannot be expressed in the intended format in the conversion from one floating-point type
to another floating-point type, the action taken is implementation-defined.
・
Conversion from double-precision floating-point type to single-precision floating-point type
If the original value is +NaN
→
The significand of the double-precision floating-point number is shifted
two bits to the left and the higher-order 32 bits obtained. If the lower-
order 32 bits of the truncated significand are not
0x0
, the LSB of the
32-bit significand is set to 1, and the logical sum of that value and
0x7f900000
is used (+NaN).
If the original value is –NaN
→
The significand of the double-precision floating-point number is shifted
two bits to the left and the higher-order 32 bits obtained. If the lower-
order 32 bits of the truncated significand are not
0x0
, the LSB of the
32-bit significand is set to 1, and the logical sum of that value and
0xff900000
is used (
−
NaN).
If the original value is too large
→
0x7f800000 (+
∞
)
If the original value is too small
→
0xff800000 (−
∞
)
If the original value is too close to 0 (larger than 0)
→
0x00000000 (+0)
If the original value is too close to 0 (less than 0)
→
0x80000000 (−0)
・
Conversion from single-precision floating-point type to double-precision floating-point type
If the original value is +NaN
→
The significand of the single-precision floating-point number is
shifted two bits to the right, and the logical sum of that value and
0x7ff80000 00000000
is used.
If the original value is
−
NaN
→
The significand of the single-precision floating-point number is
shifted two bits to the right, and the logical sum of that value and
0xfff80000 00000000
is used.
Содержание S5U1C17001C
Страница 6: ......
Страница 17: ...1 General S5U1C17001C Manual 1 General ...
Страница 18: ......
Страница 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Страница 22: ......
Страница 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Страница 30: ......
Страница 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Страница 104: ......
Страница 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Страница 122: ......
Страница 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Страница 366: ......
Страница 385: ...7 Library S5U1C17001C Manual 7 library ...
Страница 386: ......
Страница 404: ...7 18 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 7 liBrary THIS PAGE IS BLANK ...
Страница 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Страница 406: ......
Страница 438: ...8 32 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 8 aSSEMBlEr THIS PAGE IS BLANK ...
Страница 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Страница 440: ......
Страница 448: ...9 8 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 9 linkEr THIS PAGE IS BLANK ...
Страница 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Страница 450: ......
Страница 625: ...10 174 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 10 DEBUggEr THIS PAGE IS BLANK ...
Страница 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Страница 627: ......
Страница 695: ...11 68 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 11 OTHEr TOOlS THIS PAGE IS BLANK ...
Страница 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...