|
|
On certain implementations, the C compiler produces code that uses IEEE double-extended-precision arithmetic. On implementations that do not produce IEEE double-extended-precision arithmetic, either for intermediate or final results, all results are computed with the precision implicit in their type.
ANSI C includes a new
data type called long double,
which maps to the IEEE extended-precision format.
Extended-precision
is a wider type than double.
Doubles
on the Intel386 microprocessor are
64 bits, long doubles are 80 bits.
All arithmetic operations (+,-,*,/)
work analogously.
However, ANSI C does not require a long double to be wider than a
double.
The C compilation system handles long double in different
fashions, dependent on the implementation.
For example, on Intel processors, complete support
for long double is available.
When you use the -Xc option to the cc
command and the implementation does not produce
double-extended-precision arithmetic code,
the compiler treats a
long double
as computationally equivalent to a double.
When you use the -Xt or -Xa options
under these conditions,
the compiler treats a
long double as an error.