Next: Literals
Up: Types
Previous: Types
Contents
Index
Numerical types
C has a wide range of numerical types, of which the most useful are
int, float and double. The ranges of the various types
on the PWF system are given in the tables below. (Three types not
shown are signed short, signed int and signed long,
which are synonyms for short, int, and long
respectively). To find out the ranges on other systems, use the code
at the end of this section. On many systems, float quantities lack precision
and double quantities are to be preferred. On the PWF all CCATSL functions require double
floating-point quantities.
Table 1.1:
The integer numerical types on the PWF system.
| type name |
size (bytes) |
lower limit |
upper limit |
unsigned char |
1 |
0 |
255 |
signed char |
1 |
128 |
127 |
char |
1 |
128 |
127 |
unsigned short |
2 |
0 |
65535 |
short |
2 |
32768 |
32767 |
unsigned int |
4 |
0 |
4294967295 |
int |
4 |
2147483648 |
2147483647 |
unsigned long |
4 |
0 |
4294967295 |
long |
4 |
2147483648 |
2147483647 |
|
Table 1.2:
The floating-point numerical types on the PWF system.
| type name |
size (bytes) |
positive lower limit |
positive upper limit |
epsilon |
float |
4 |
1.175494e 38 |
3.402823e 38 |
1.192093e 07 |
double |
8 |
2.225074e 308 |
1.797693e 308 |
2.220446e 16 |
long double |
12 |
2.225074e 308 |
1.797693e 308 |
2.220446e 16 |
|
Subsections
Next: Literals
Up: Types
Previous: Types
Contents
Index
CATAM admin
2010-02-23