|
CC78K0S Datasheet, PDF (44/520 Pages) NEC – C Compiler Ver.1.30 or Later Language | |||
|
◁ |
CHAPTER 2 CONSTRUCTS OF C LANGUAGE
Table 2-3. List of Basic Data Types
Type
(signed) char
unsigned char
(signed) short int
unsigned short int
(signed) int
unsigned int
(signed) long int
unsigned long int
float
double
long double
Value Range
â128 to +127
0 to 255
â32768 to +32767
0 to 65535
â32768 to +32767
0 to 65535
â2147483648 to +2147483647
0 to 4294967295
1.17549435Eâ38F to 3.40282347E+38F
1.17549435Eâ38F to 3.40282347E+38F
1.17549435Eâ38F to 3.40282347E+38F
⢠The signed keyword can be omitted. However, with the char type, it is judged as signed char or
unsigned char depending on the condition at compilation.
⢠short int data and int data are handled as data which have the same value range but are of different
types.
⢠unsigned short int data and unsigned int data are handled as data which have the same value range
but are of different types.
⢠float, double, and long double data are handled as data which have the same value range but are of
different types.
(i) Floating-point number (float type) specifications
⢠Format
The floating-point number format is shown below.
(Higher address) s
e
m
31 30
23 22
The numerical values in this format are as follows.
(Lower address)
0
(Value of sign)
(Value of exponent)
(â1)
* (Value of mantissa) *2
s: Sign (1 bit)
0 for a positive number and 1 for a negative number.
e: Exponent (8 bits)
An exponent with a base of 2 is expressed as a 1-byte integer (expressed by twoâs complement
in the case of a negative), and used after having a further bias of 7FH added. These
relationships are shown in Table 2-4 below.
44
Userâs Manual U14872EJ1V0UM
|
▷ |