diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2012-03-07 18:10:48 +0100 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2012-03-07 18:10:48 +0100 |
commit | 61733e7ff1a756e9325154d9d52cdcdeb27d9097 (patch) | |
tree | a0f842807088c4986fb918be0de70bac3f18ea04 /core/glibc/glibc-2.15-nearbyintf-rounding.patch | |
parent | 42badd081241c57a3b9bbd7a18dec85e64038314 (diff) | |
parent | 5a680f7689b01b4b7a0bfade1a6c1f659f8cbed4 (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts:
community/bin2iso/PKGBUILD
community/espeak/PKGBUILD
community/gnash/PKGBUILD
community/gtk2hs-buildtools/PKGBUILD
community/haskell-binary/PKGBUILD
community/haskell-dataenc/PKGBUILD
community/haskell-ghc-paths/PKGBUILD
community/haskell-haskeline/PKGBUILD
community/haskell-hslogger/PKGBUILD
community/haskell-tar/PKGBUILD
community/haskell-terminfo/PKGBUILD
community/haskell-utf8-string/PKGBUILD
community/haskell-x11-xft/PKGBUILD
community/kmess/PKGBUILD
community/libident/PKGBUILD
community/lwm/PKGBUILD
core/dialog/PKGBUILD
core/gcc/PKGBUILD
core/libtool/PKGBUILD
core/ppl/PKGBUILD
extra/boost/PKGBUILD
extra/dnsmasq/PKGBUILD
extra/ghc/PKGBUILD
extra/haskell-html/PKGBUILD
extra/haskell-http/PKGBUILD
extra/haskell-mtl/PKGBUILD
extra/haskell-network/PKGBUILD
extra/haskell-parsec/PKGBUILD
extra/haskell-quickcheck/PKGBUILD
extra/haskell-regex-base/PKGBUILD
extra/haskell-regex-compat/PKGBUILD
extra/haskell-regex-posix/PKGBUILD
extra/haskell-text/PKGBUILD
extra/haskell-transformers/PKGBUILD
extra/haskell-zlib/PKGBUILD
extra/liborigin2/PKGBUILD
extra/libpst/PKGBUILD
extra/mkvtoolnix/PKGBUILD
extra/pekwm/PKGBUILD
extra/soprano/PKGBUILD
extra/udisks/PKGBUILD
multilib-testing/lib32-libpciaccess/PKGBUILD
multilib/gcc-multilib/PKGBUILD
multilib/lib32-glibc/PKGBUILD
multilib/lib32-glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch
multilib/lib32-glibc/glibc-2.15-ifunc.patch
multilib/lib32-glibc/glibc-2.15-revert-netlink-cache.patch
multilib/lib32-glibc/glibc-2.15-scanf.patch
multilib/libtool-multilib/PKGBUILD
staging/kdeedu-kig/PKGBUILD
staging/kdeedu-rocs/PKGBUILD
testing/libpciaccess/PKGBUILD
testing/mkinitcpio-busybox/PKGBUILD
testing/xorg-server/PKGBUILD
Diffstat (limited to 'core/glibc/glibc-2.15-nearbyintf-rounding.patch')
-rw-r--r-- | core/glibc/glibc-2.15-nearbyintf-rounding.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/core/glibc/glibc-2.15-nearbyintf-rounding.patch b/core/glibc/glibc-2.15-nearbyintf-rounding.patch new file mode 100644 index 000000000..b2bb9caac --- /dev/null +++ b/core/glibc/glibc-2.15-nearbyintf-rounding.patch @@ -0,0 +1,75 @@ +diff --git a/math/libm-test.inc b/math/libm-test.inc +index c8186c8..1016753 100644 +--- a/math/libm-test.inc ++++ b/math/libm-test.inc +@@ -4632,6 +4632,29 @@ nearbyint_test (void) + TEST_f_f (nearbyint, 524286.75, 524287.0); + TEST_f_f (nearbyint, 524288.75, 524289.0); + ++ TEST_f_f (nearbyint, 1048576.75, 1048577.0); ++ TEST_f_f (nearbyint, 2097152.75, 2097153.0); ++ TEST_f_f (nearbyint, 2492472.75, 2492473.0); ++ TEST_f_f (nearbyint, 2886220.75, 2886221.0); ++ TEST_f_f (nearbyint, 3058792.75, 3058793.0); ++ TEST_f_f (nearbyint, -1048576.75, -1048577.0); ++ TEST_f_f (nearbyint, -2097152.75, -2097153.0); ++ TEST_f_f (nearbyint, -2492472.75, -2492473.0); ++ TEST_f_f (nearbyint, -2886220.75, -2886221.0); ++ TEST_f_f (nearbyint, -3058792.75, -3058793.0); ++#ifndef TEST_FLOAT ++ TEST_f_f (nearbyint, 70368744177664.75, 70368744177665.0); ++ TEST_f_f (nearbyint, 140737488355328.75, 140737488355329.0); ++ TEST_f_f (nearbyint, 281474976710656.75, 281474976710657.0); ++ TEST_f_f (nearbyint, 562949953421312.75, 562949953421313.0); ++ TEST_f_f (nearbyint, 1125899906842624.75, 1125899906842625.0); ++ TEST_f_f (nearbyint, -70368744177664.75, -70368744177665.0); ++ TEST_f_f (nearbyint, -140737488355328.75, -140737488355329.0); ++ TEST_f_f (nearbyint, -281474976710656.75, -281474976710657.0); ++ TEST_f_f (nearbyint, -562949953421312.75, -562949953421313.0); ++ TEST_f_f (nearbyint, -1125899906842624.75, -1125899906842625.0); ++#endif ++ + END (nearbyint); + } + +diff --git a/sysdeps/ieee754/flt-32/s_nearbyintf.c b/sysdeps/ieee754/flt-32/s_nearbyintf.c +index 04ef9ab..a6d602b 100644 +--- a/sysdeps/ieee754/flt-32/s_nearbyintf.c ++++ b/sysdeps/ieee754/flt-32/s_nearbyintf.c +@@ -30,18 +30,12 @@ __nearbyintf(float x) + { + fenv_t env; + int32_t i0,j0,sx; +- u_int32_t i,i1; + float w,t; + GET_FLOAT_WORD(i0,x); + sx = (i0>>31)&1; + j0 = ((i0>>23)&0xff)-0x7f; + if(j0<23) { + if(j0<0) { +- if((i0&0x7fffffff)==0) return x; +- i1 = (i0&0x07fffff); +- i0 &= 0xfff00000; +- i0 |= ((i1|-i1)>>9)&0x400000; +- SET_FLOAT_WORD(x,i0); + libc_feholdexceptf (&env); + w = TWO23[sx]+x; + t = w-TWO23[sx]; +@@ -49,17 +43,11 @@ __nearbyintf(float x) + GET_FLOAT_WORD(i0,t); + SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31)); + return t; +- } else { +- i = (0x007fffff)>>j0; +- if((i0&i)==0) return x; /* x is integral */ +- i>>=1; +- if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0); + } + } else { + if(__builtin_expect(j0==0x80, 0)) return x+x; /* inf or NaN */ + else return x; /* x is integral */ + } +- SET_FLOAT_WORD(x,i0); + libc_feholdexceptf (&env); + w = TWO23[sx]+x; + t = w-TWO23[sx]; |