]> sourceware.org Git - glibc.git/commit
PowerPC floating point little-endian [10 of 15]
authorAlan Modra <amodra@gmail.com>
Sat, 17 Aug 2013 09:00:23 +0000 (18:30 +0930)
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 15 Nov 2013 17:24:51 +0000 (11:24 -0600)
commitc88484088a11983552f59cafcccbcd7a16b5ab09
tree2cb7d16d8aebdc7cd74d8d73aa052af6ee486f12
parentcbeb3f0edee7afc90bb02bb973863a43ab5b076d
PowerPC floating point little-endian [10 of 15]
http://sourceware.org/ml/libc-alpha/2013-07/msg00201.html

These two functions oddly test x+1>0 when a double x is >= 0.0, and
similarly when x is negative.  I don't see the point of that since the
test should always be true.  I also don't see any need to convert x+1
to integer rather than simply using xr+1.  Note that the standard
allows these functions to return any value when the input is outside
the range of long long, but it's not too hard to prevent xr+1
overflowing so that's what I've done.

(With rounding mode FE_UPWARD, x+1 can be a lot more than what you
might naively expect, but perhaps that situation was covered by the
x - xrf < 1.0 test.)

* sysdeps/powerpc/fpu/s_llround.c (__llround): Rewrite.
* sysdeps/powerpc/fpu/s_llroundf.c (__llroundf): Rewrite.
ChangeLog
sysdeps/powerpc/fpu/s_llround.c
sysdeps/powerpc/fpu/s_llroundf.c
This page took 0.045439 seconds and 5 git commands to generate.