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]
Other format: [Raw text]

[Bug target/12639] long double comparison is broken



------- Comment #4 from christopher dot eltschka at physik dot uni-regensburg dot de  2005-10-27 10:38 -------
(In reply to comment #3)
> As workaround for == 0, !! seems to work. Unfortunately I don't know a
> workaround for > 0 and < 0.
> 

Sorry for self-reply, but now I've found a simple workaround for all cases:
Instead of comparing with 0, just add 1 and compare with 1.
For some reason this works even if the number to compare with happens to be -1
(i.e. if after adding 1 you get 0).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12639


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