This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: assignment problem with doubles: getting -NaN unexpectedly


> I have a problem with an assigment of one double variable to
> another, like dub1 = dub2; I'm getting -NaN in dub1, even if there
> is a valid value in dub2.  This is on RedHat Linux 6.0, kernel
> 2.2.5, glibc-2.1.1-6 C compiler is egcs-2.91.66 19990314/Linux
> (egcs-1.1.2 release)

I'm not a subscriber to the gcc-bugs list but I ran across this on the 
mailing list archive; it was posted last Friday.  

This problem has hit me, too, with gcc-2.95.2 and very recent libc and
linux kernel.  With -O3, simple double math (no division) results in
NaN sporadically, but inserting debugging print statements seems to
make this not happen.

Any workarounds or theories? 

Thanks,
Bill Gribble



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]