This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fabs(-0.0) and soft-float
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 03 Oct 2002 05:00:19 +0200
- Subject: Re: fabs(-0.0) and soft-float
- Organization: Integrable Solutions
- References: <20021003023916.GA22385@redhat.com>
Aldy Hernandez <aldyh@redhat.com> writes:
[...]
| Should we have gcc fold fabs() like this:?
|
| if (x > 0)
| x = x;
| else
| x = -x;
This is better.
| Ideas?
How about unsetting the sign-bit? I would expect fabs() clearing the
signbit of a QNaN.
-- Gaby