Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Studio 12.3: C User's Guide Oracle Solaris Studio 12.3 Information Library |
1. Introduction to the C Compiler
2. C-Compiler Implementation-Specific Information
7. Converting Applications for a 64-Bit Environment
8. cscope: Interactively Examining a C Program
A. Compiler Options Grouped by Functionality
B. C Compiler Options Reference
C. Implementation-Defined ISO/IEC C99 Behavior
E. Implementation-Defined ISO/IEC C90 Behavior
F.3 Argument-Passing Mechanism
H. Oracle Solaris Studio C: Differences Between K&R C and ISO C
Bit numbering of any given data element depends on the architecture in use: SPARCstation machines use bit 0 as the least significant bit, with byte 0 being the most significant byte. The tables in this section describe the various representations.
Integer types used in ISO C are short, int, long, and long long:
Table F-2 Representation of short
|
Table F-3 Representation of int
|
Table F-4 Representation of long Compiled with -m32
|
Table F-5 Representation of long (-m64) and long long (both -m32 and -m64)
|
float, double, and long double data elements are represented according to the ISO IEEE 754-1985 standard. The representation is:
(-1)s *2(e - bias) *[j.f]
where:
s is the sign
e is the biased exponent
j is the leading bit, determined by the value of e. In the case of long double (x86), the leading bit is explicit; in all other cases, it is implicit.
f = fraction
u means that the bit can be either 0 or 1 (used in the tables in this section).
For IEEE Single and Double, j is always implicit. When the biased exponent is 0, j is 0, and the resulting number is subnormal as long as f is not 0. When the biased exponent is greater than 0, j is 1 as long as the number is finite.
For Intel 80–bit Extended, j is always explicit.
The following tables show the position of the bits.
Table F-6 float Representation
|
Table F-7 double Representation
|
Table F-8 long double Representation (SPARC)
|
Table F-9 long double Representation (x86)
|
For further information, refer to the Numerical Computation Guide.
float and double numbers are said to contain a “hidden,” or implied, bit, providing for one more bit of precision than would otherwise be the case. In the case of long double, the leading bit is implicit (SPARC) or explicit (x86); this bit is 1 for normal numbers, and 0 for subnormal numbers.
Table F-10 float Representations
|
Table F-11 double Representations
|
Table F-12 long double Representations
|
The following tables show the hexadecimal representations.
Table F-13 Hexadecimal Representation of Selected Numbers (SPARC)
|
Table F-14 Hexadecimal Representation of Selected Numbers (x86)
|
For further information, refer to the Numerical Computation Guide.
A pointer in C occupies four bytes. A pointer in C occupies 8 bytes on 64–bit SPARC v9 architectures. The NULL value pointer is equal to zero.
Arrays are stored with their elements in a specific storage order. The elements are actually stored in a linear sequence of storage elements.
C arrays are stored in row-major order. The last subscript in a multidimensional array varies the fastest.
String data types are arrays of char elements. The maximum number of characters allowed in a string literal or wide string literal (after concatenation) is 4,294,967,295.
See F.1 Storage Allocation for information on the size limit of storage allocated on the stack.
Table F-15 Array Types and Storage
|
Static and global arrays can accommodate many more elements.
This section describes the results derived from applying the basic arithmetic operations to combinations of exceptional and ordinary floating-point values. The information that follows assumes that no traps or any other exception actions are taken.
The following table explains the abbreviations.
Table F-16 Abbreviation Usage
|
The following tables describe the types of values that result from arithmetic operations performed with combinations of different types of operands.
Table F-17 Addition and Subtraction Results
|
1Num + Num could be Inf, rather than Num, when the result is too large (overflow). Inf + Inf = NaN when the infinities are of opposite sign.
Table F-18 Multiplication Results
|
Table F-19 Division Results
|
Table F-20 Comparison Results
|
Note - NaN compared with NaN is unordered, and results in inequality. +0 compares equal to –0.