Epson S5U1C17001C Manual page 391

Cmos 16-bit single chip microcomputer, c compiler package for s1c17 family
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

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
S
Exponent 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:
Maximum normalized number:
Minimum normalized number:
Maximum unnormalized number: 2.22507e-308
Minimum unnormalized number: 4.94065e-324
Infinity:
Negative infinity:
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
S
Exponent 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:
Maximum normalized number:
Minimum normalized number:
Maximum unnormalized number: 1.17549e-38f
Minimum unnormalized number: 1.40129e-45f
Infinity:
Negative infinity:
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 ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
52 51
Fixed-point part
0.0e+0
-0.0e+0
1.79769e+308
2.22507e-308
23 22
Fixed-point part
0.0e+0f
-0.0e+0f
3.40282e+38f
1.17549e-38f
EPSOn
0
0x00000000 00000000
0x80000000 00000000
0x7fefffff ffffffff
0x00100000 00000000
0x000fffff ffffffff
0x00000000 00000001
0x7ff00000 00000000
0xfff00000 00000000
0
0x00000000
0x80000000
0x7f7fffff
0x00800000
0x007fffff
0x00000001
0x7f800000
0xff800000
7 liBrary
7
Library
7-5

Advertisement

Table of Contents
loading

Table of Contents