S5U1C17001C ManUal
EPSOn
7-5
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
7 liBrary
7
Library
floating-point format
The
xgcc
C compiler supports the
float
type (32-bit single-precision) and the
double
type (64-bit double-
precision) floating-point numbers conforming to IEEE standards.
The following shows the internal format of floating-point numbers.
format of double-precision floating-point number
The real number of the
double
type consists of 64 bits, as shown below.
63 62
52 51
0
S
Exponent part
Fixed-point part
Bit 63:
Sign bit (1 bit)
Bits 62–52: Exponent part (11 bits)
Bits 51–0: Fixed-point part (52 bits)
The result of a floating-point calculation is stored in the 64-bit area beginning with the address loaded in
the
%r0
register.
The following shows the relationship of the effective range, floating-point representation, and internal data
of the
double
type.
+0:
0.0e+0
0x00000000 00000000
-0:
-0.0e+0
0x80000000 00000000
Maximum normalized number:
1.308
0x7fefffff ffffffff
Minimum normalized number:
2.22507e-308
0x00100000 00000000
Maximum unnormalized number:
2.22507e-308
0x000fffff ffffffff
Minimum unnormalized number:
4.94065e-324
0x00000000 00000001
Infinity:
0x7ff00000 00000000
Negative infinity:
0xfff00000 00000000
Values
0x7ff00000 00000001
to
0x7fffffff ffffffff
and
0xfff00000 00000001
to
0xffffffff ffffffff
are not recognized as numeric values.
format of single-precision floating-point number
The real number of the
float
type consists of 32 bits, as shown below.
31 30
23 22
0
S
Exponent part
Fixed-point part
Bit 31:
Sign bit (1 bit)
Bits 30–23: Exponent part (8 bits)
Bits 22–0: Fixed-point part (23 bits)
This type of value occupies two registers. For example, the result of a floating-point calculation is stored in
the
%r1
and
%r0
registers.
%r1
register: Sign bit, exponent part, and 7 high-order bits of fixed-point part (22:16)
%r0
register: 16 low-order bits of fixed-point part (15:0)
The following shows the relationship of the effective range, floating-point representation, and internal data
of the
float
type.
+0:
0.0e+0f
0x00000000
-0:
-0.0e+0f
0x80000000
Maximum normalized number:
3.38f
0x7f7fffff
Minimum normalized number:
1.17549e-38f
0x00800000
Maximum unnormalized number:
1.17549e-38f
0x007fffff
Minimum unnormalized number:
1.40129e-45f
0x00000001
Infinity:
0x7f800000
Negative infinity:
0xff800000
Values
0x7f800001
to
0x7fffffff
and
0xff800001
to
0xffffffff
are not recognized as
numeric values.
note
The floating-point numbers in the
xgcc
C compiler differ from the IEEE-based FPU in precision and
functionality, including the manner in which infinity is handled.
Содержание 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 ...