This is the mail archive of the
mailing list for the GCC project.
Re: fabs(-0.0) and soft-float
- From: N V Krishna <nvk at cs dot purdue dot edu>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, Richard Henderson <rth at redhat dot com>, <gcc at gcc dot gnu dot org>
- Date: Wed, 2 Oct 2002 23:47:03 -0500 (EST)
- Subject: Re: fabs(-0.0) and soft-float
This suffers from a similar problem as before :
If x is +0.0 then what we get is -0.0, which is not desired either.
On 3 Oct 2002, Gabriel Dos Reis wrote:
#Aldy Hernandez <email@example.com> writes:
#| > We could probably come up with some way to point at the sign bit
#| > for implementing ABS and NEG for a particular target. In the
#| > meantime, the suggested change works for at least the normal
#| > numbers.
#| As in a patch to make it do:?
#| if (x > 0)
#| x = x;
#| x = -x;
#Yes, RTH and I agree it does a good job for the time being.