------- Comment #20 from jan at etpmod dot phys dot tue dot nl 2006-09-27
07:51 -------
First of all, the problem is that bad that even 1*z != z when *no* optimisation
is requested. Consider:
#include <iostream>
#include <limits>
#include <complex>
int main()
{
std::complex<double> z(std::numeric_limits<double>::infinity(), 0.0);
z*=1;
std::cout << z << std::endl;
return 0;
}
Using gcc-4.1.0, with -O0 this gives (inf,nan), with optimisation levels >0 it
yields the expected (inf,0).
Secondly, could somebody clarify how patch
http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00560.html is related to these
issues? Part of that patch seems to deal with fixing NaN's that should be Infs.
Was it ever applied?
Greetings from an otherwise happy gcc-user (whose complex Bessel functions
Y_n(z) and K_n(z) erroneously return NaN for |z|->0, instead of -/+Inf).
--
jan at etpmod dot phys dot tue dot nl changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jan at etpmod dot phys dot
| |tue dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28408