This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: 128 bit floating point arithmetic
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: hladky dot jiri at seznam dot cz, gcc-help at gcc dot gnu dot org
- Date: Sat, 21 Feb 2004 11:50:48 -0600
- Subject: Re: 128 bit floating point arithmetic
Dear Jirka,
Out of curiosity, I tested both the -m96bit-long-double and the -m128bit-long-double on my Intel box ... and both of them are 80-bit IEEE 754 numbers. The former with 16-bits fallow (or 2 pad bytes), the latter with 48-bits fallow (or 6 pad bytes).
The -m128bit-long-double option is useful for alignment issues, NOT for improved mantissa precision nor exponent range.
Both -m96bit-long-double and -m128bit-long-double had the same test results for exponent and mantissa sizes...
float : exp:8 mant:23+1
double : exp:11 mant:52+1
long double : exp:15 mant:64
(The "+1" on the mantissa is if there is an implicit "hidden" most-significant bit.)
If you are curious as to the actual Intel memory layout of these different formats, I can dummy up a little ASCII art. Let me know.
IEEE 754 terminology for (typical) C/C++ float / double / long double is single / double / extended.
More info at...
<http://babbage.cs.qc.edu/courses/cs341/IEEE-754references.html>
HTH,
--Eljay