Technical data
Cray Standard C/C++ Reference Manual
For exact values, use the macros defined in the header file, float.h(3c).
Rounding of 32 and 64 bit floating-point arithmetic is determined by the
current rounding mode. The 128 bit floating-point arithmetic is rounded to the
closest, without regard to the rounding mode. A floating-point value, when
rounded off, can be accurately represented to approximately 7 decimal places
for single-precision types, approximately 16 decimal places for double-precision
types, and approximately 34 decimal places for extended double-precision types
as determined by the following equation:
(10.2)
Digits beyond these precisions may not be accurate.
Epsilon, the difference between 1.0 and the smallest value greater than 1.0 that is
representable in the given floating-point type, is approximately as follows:
1.2 × 10
–7
Single (32 bits)
2.2 × 10
–16
Double (64 bits)
1.9 × 10
–34
Extended double (128 bits)
Upon entering the main function at the beginning of the program execution, the
rounding mode is set to round to nearest, all floating-point exception status
flags are cleared, and traps are enabled for overflow, invalid operation, and
division-by-zero exceptions. Traps are disabled for all other exceptions.
10.1.2.7 Arrays and Pointers
An unsigned int value can hold the maximum size of an array. The type
size_t is defined to be a typedef name for unsigned int in the headers:
malloc.h, stddef.h, stdio.h, stdlib.h, string.h, and time.h. If more
than one of these headers is included, only the first defines size_t.
A type int can hold the difference between two pointers to elements of the same
array. The type ptrdiff_t is defined to be a typedef name for int in the
header stddef.h.
If a pointer type’s value is cast to a signed or unsigned int or long int, and
then cast back to the original type’s value, the two pointer values will compare
equal.
148 S–2179–36










