C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
HP C Implementation-Defined Behavior
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
A-18
G.3.5 Integers
G.3.5 Integers
This table describes the amount of storage and the range of various types of integers:
The result of converting an integer to a shorter signed integer is undefined and may
result in arithmetic overflow.
The result of converting an unsigned integer to a signed integer of equal length is
undefined and may result in arithmetic overflow.
The result of bitwise operations on signed integers is the same as the result for
unsigned integers, except for the right shift.
The result of a right shift of a negative-valued signed integral type is an arithmetic right
shift for signed numbers and logical right shift for unsigned numbers.
The remainder on integer division has a positive sign (+).
G.3.6 Floating Point
This subsection applies only to Tandem floating-point format. The scaled value of a
floating constant that is in the range of the representable value for its type is the larger
representable value immediately adjacent to the nearest representable value.
This table describes the amount of storage and the range of various types of floating-
point numbers.
Designation Size(bits) Range
char 8 0 to 255
signed char 8 -128 to 127
unsigned char 8 0 to 255
short 16 -32,768 to 32,767
signed short 16 -32,768 to 32,767
unsigned short 16 0 to 65,535
int 32 -2,147,483,648 to 2,147,483,647
signed int 32 -2,147,483,648 to 2,147,483,647
unsigned int 32 0 to 4,294,967,295
long 32 -2,147,483,648 to 2,147,483,647
signed long 32 -2,147,483,648 to 2,147,483,647
unsigned long 32 0 to 4,294,967,295
Designation Size(bits) Range
float 32 8.63617e-78 to 1.15792e77
double 64
8.6361685550944446e-78 to 1.1579208923716189e77
long double 64
8.6361685550944446e-78 to 1.1579208923716189e77