This is the mail archive of the gcc@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]

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.

Krishna
On 3 Oct 2002, Gabriel Dos Reis wrote:

#Aldy Hernandez <aldyh@redhat.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;
#|          else
#|            x = -x;
#
#Yes, RTH and I agree it does a good job for the time being.
#
#-- Gaby
#

-- 
Homepage:http://www.cs.purdue.edu/homes/nvk



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