This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19974] incorrect complex division on ia-64 with flag_complex_method = 2
- From: "rth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Feb 2005 02:47:55 -0000
- Subject: [Bug target/19974] incorrect complex division on ia-64 with flag_complex_method = 2
- References: <20050215161817.19974.Thomas.Koenig@online.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rth at gcc dot gnu dot org 2005-02-17 02:47 -------
The "problem" is the use of the fused multiply-and-add instructions.
1672 y = (b - (a * ratio)) / denom;
d6: 70 70 24 0c 54 00 fms.s.s0 f7=f9,f6,f14
This computes the intermediate results of the entire numerator with 82 bits of
precision. One can argue that this is inappropriate, since it's not what the
source wrote.
HOWEVER, if I rewrite __divsc3 to explicitly use "long double" to compute
intermediate results -- which as far as I can see should be legitimate -- I
also get 18059 for the imaginary part of the result. As best I can figure,
that result is more mathematically correct than 0.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19974