public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
@ 2006-03-06 20:29 sjmunroe at us dot ibm dot com
2006-03-06 20:44 ` [Bug math/2423] " sjmunroe at us dot ibm dot com
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2006-03-06 20:29 UTC (permalink / raw)
To: glibc-bugs
The implementations of the (IBM double double format) long double
(./ldbld-128ibm/) for ceill, floorl, rintl, roundl, truncl, rounds incorrectly
when the integer portion is contained in th ehigh double, but the fractional
postion is contained in the low double.
--
Summary: Errors in long double (ldbl-128ibm) rounding functions
in glibc-2.4
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: math
AssignedTo: aj at suse dot de
ReportedBy: sjmunroe at us dot ibm dot com
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: powerpc-gnu-linux
GCC host triplet: powerpc-gnu-linux
GCC target triplet: powerpc-gnu-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
@ 2006-03-06 20:44 ` sjmunroe at us dot ibm dot com
2006-03-06 20:48 ` sjmunroe at us dot ibm dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2006-03-06 20:44 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From sjmunroe at us dot ibm dot com 2006-03-06 20:44 -------
Created an attachment (id=904)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=904&action=view)
Sample of error output.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
2006-03-06 20:44 ` [Bug math/2423] " sjmunroe at us dot ibm dot com
@ 2006-03-06 20:48 ` sjmunroe at us dot ibm dot com
2006-03-06 20:55 ` sjmunroe at us dot ibm dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2006-03-06 20:48 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From sjmunroe at us dot ibm dot com 2006-03-06 20:48 -------
Created an attachment (id=905)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=905&action=view)
Standalone test cases.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
2006-03-06 20:44 ` [Bug math/2423] " sjmunroe at us dot ibm dot com
2006-03-06 20:48 ` sjmunroe at us dot ibm dot com
@ 2006-03-06 20:55 ` sjmunroe at us dot ibm dot com
2006-03-07 8:24 ` cvs-commit at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2006-03-06 20:55 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From sjmunroe at us dot ibm dot com 2006-03-06 20:55 -------
Created an attachment (id=906)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=906&action=view)
Proposed patch
Proposed patch for ./ldbl-128ibm/ implementations of ceill, floorl, rintl,
roundl, truncl
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
` (2 preceding siblings ...)
2006-03-06 20:55 ` sjmunroe at us dot ibm dot com
@ 2006-03-07 8:24 ` cvs-commit at gcc dot gnu dot org
2006-03-16 11:46 ` cvs-commit at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2006-03-07 8:24 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2006-03-07 08:24 -------
Subject: Bug 2423
CVSROOT: /cvs/glibc
Module name: libc
Branch: fedora-branch
Changes by: jakub@sources.redhat.com 2006-03-07 08:24:13
Modified files:
. : ChangeLog
math : libm-test.inc
sysdeps/ieee754/ldbl-128ibm: e_fmodl.c e_rem_pio2l.c math_ldbl.h
s_ceill.c s_floorl.c s_rintl.c
s_roundl.c s_truncl.c
sysdeps/powerpc/fpu: fegetround.c fenv_libc.h fesetround.c
Added files:
sysdeps/powerpc/fpu: math_ldbl.h
Log message:
2006-03-03 Steven Munroe <sjmunroe@us.ibm.com>
Alan Modra <amodra@bigpond.net.au>
[BZ #2423]
* math/libm-test.inc [TEST_LDOUBLE] (ceil_test, floor_test, rint_test,
round_test, trunc_test): Add new tests.
* sysdeps/powerpc/fpu/fenv_libc.h (__fegetround, __fesetround):
Define inline implementations.
* sysdeps/powerpc/fpu/fegetround.c: Use __fegetround.
* sysdeps/powerpc/fpu/fesetround.c: Use __fesetround.
* sysdeps/ieee754/ldbl-128ibm/math_ldbl.h
(EXTRACT_IBM_EXTENDED_MANTISSA, INSERT_IBM_EXTENDED_MANTISSA):
Removed, replaced with.
(ldbl_extract_mantissa, ldbl_insert_mantissa, ldbl_pack, ldbl_unpack,
ldbl_canonicalise, ldbl_nearbyint): Define inline utility
functions for IBM long double format.
* sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Replace
EXTRACT_IBM_EXTENDED_MANTISSA and INSERT_IBM_EXTENDED_MANTISSA
with ldbl_extract_mantissa and ldbl_insert_mantissa.
* sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c (__ieee754_rem_pio2l):
Replace EXTRACT_IBM_EXTENDED_MANTISSA with ldbl_extract_mantissa.
(ldbl_extract_mantissa, ldbl_insert_mantissa): Defined.
* sysdeps/ieee754/ldbl-128ibm/s_ceill.c (__ceill): Handle rounding
that spans doubles in IBM long double format.
* sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Likewise.
* sysdeps/powerpc/fpu/math_ldbl.h: New file.
* sysdeps/powerpc/powerpc64/fpu/s_rintl.S: Removed.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/ChangeLog.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.8782.2.172&r2=1.8782.2.173
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/math/libm-test.inc.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.61.2.6&r2=1.61.2.7
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.1.2.1&r2=1.1.2.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.1.2.1&r2=1.1.2.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.1.2.1&r2=1.1.2.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_ceill.c.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.1.2.2&r2=1.1.2.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_floorl.c.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.1.2.2&r2=1.1.2.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_rintl.c.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.1.2.1&r2=1.1.2.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_roundl.c.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.1.2.1&r2=1.1.2.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_truncl.c.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.1.2.1&r2=1.1.2.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/fpu/math_ldbl.h.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=NONE&r2=1.1.2.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/fpu/fegetround.c.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.2&r2=1.2.4.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/fpu/fenv_libc.h.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.2&r2=1.2.4.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/fpu/fesetround.c.diff?cvsroot=glibc&only_with_tag=fedora-branch&r1=1.3.4.1&r2=1.3.4.2
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
` (3 preceding siblings ...)
2006-03-07 8:24 ` cvs-commit at gcc dot gnu dot org
@ 2006-03-16 11:46 ` cvs-commit at gcc dot gnu dot org
2006-03-16 11:47 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2006-03-16 11:46 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2006-03-16 11:46 -------
Subject: Bug 2423
CVSROOT: /cvs/glibc
Module name: libc
Changes by: roland@sources.redhat.com 2006-03-16 11:46:30
Modified files:
math : libm-test.inc
Log message:
2006-03-07 Jakub Jelinek <jakub@redhat.com>
[BZ #2423]
* math/libm-test.inc [TEST_LDOUBLE] (ceil_test, floor_test, rint_test,
round_test, trunc_test): Only run some of the new tests if
LDBL_MANT_DIG > 100.
2006-03-03 Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au>
[BZ #2423]
* math/libm-test.inc [TEST_LDOUBLE] (ceil_test, floor_test, rint_test,
round_test, trunc_test): Add new tests.
* sysdeps/ieee754/ldbl-128ibm/math_ldbl.h
(EXTRACT_IBM_EXTENDED_MANTISSA, INSERT_IBM_EXTENDED_MANTISSA):
Removed, replaced with ...
(ldbl_extract_mantissa, ldbl_insert_mantissa, ldbl_pack, ldbl_unpack,
ldbl_canonicalise, ldbl_nearbyint): New functions.
* sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Replace
EXTRACT_IBM_EXTENDED_MANTISSA and INSERT_IBM_EXTENDED_MANTISSA
with ldbl_extract_mantissa and ldbl_insert_mantissa.
* sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c (__ieee754_rem_pio2l):
Replace EXTRACT_IBM_EXTENDED_MANTISSA with ldbl_extract_mantissa.
(ldbl_extract_mantissa, ldbl_insert_mantissa): New inline functions.
* sysdeps/ieee754/ldbl-128ibm/s_ceill.c (__ceill): Handle rounding
that spans doubles in IBM long double format.
* sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_rintl.S: File removed.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/math/libm-test.inc.diff?cvsroot=glibc&r1=1.69&r2=1.70
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
` (4 preceding siblings ...)
2006-03-16 11:46 ` cvs-commit at gcc dot gnu dot org
@ 2006-03-16 11:47 ` cvs-commit at gcc dot gnu dot org
2006-04-23 17:43 ` drepper at redhat dot com
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2006-03-16 11:47 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2006-03-16 11:46 -------
Subject: Bug 2423
CVSROOT: /cvs/glibc
Module name: libc
Changes by: roland@sources.redhat.com 2006-03-16 11:46:37
Modified files:
sysdeps/ieee754/ldbl-128ibm: s_ceill.c s_floorl.c s_rintl.c
math_ldbl.h e_rem_pio2l.c e_fmodl.c
s_truncl.c s_roundl.c
Removed files:
sysdeps/powerpc/powerpc64/fpu: s_rintl.S
Log message:
2006-03-03 Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au>
[BZ #2423]
* math/libm-test.inc [TEST_LDOUBLE] (ceil_test, floor_test, rint_test,
round_test, trunc_test): Add new tests.
* sysdeps/ieee754/ldbl-128ibm/math_ldbl.h
(EXTRACT_IBM_EXTENDED_MANTISSA, INSERT_IBM_EXTENDED_MANTISSA):
Removed, replaced with ...
(ldbl_extract_mantissa, ldbl_insert_mantissa, ldbl_pack, ldbl_unpack,
ldbl_canonicalise, ldbl_nearbyint): New functions.
* sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Replace
EXTRACT_IBM_EXTENDED_MANTISSA and INSERT_IBM_EXTENDED_MANTISSA
with ldbl_extract_mantissa and ldbl_insert_mantissa.
* sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c (__ieee754_rem_pio2l):
Replace EXTRACT_IBM_EXTENDED_MANTISSA with ldbl_extract_mantissa.
(ldbl_extract_mantissa, ldbl_insert_mantissa): New inline functions.
* sysdeps/ieee754/ldbl-128ibm/s_ceill.c (__ceill): Handle rounding
that spans doubles in IBM long double format.
* sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_rintl.S: File removed.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/powerpc64/fpu/s_rintl.S.diff?cvsroot=glibc&r1=1.1&r2=NONE
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_ceill.c.diff?cvsroot=glibc&r1=1.2&r2=1.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_floorl.c.diff?cvsroot=glibc&r1=1.2&r2=1.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_rintl.c.diff?cvsroot=glibc&r1=1.1&r2=1.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h.diff?cvsroot=glibc&r1=1.1&r2=1.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c.diff?cvsroot=glibc&r1=1.1&r2=1.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c.diff?cvsroot=glibc&r1=1.1&r2=1.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_truncl.c.diff?cvsroot=glibc&r1=1.1&r2=1.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_roundl.c.diff?cvsroot=glibc&r1=1.1&r2=1.2
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
` (5 preceding siblings ...)
2006-03-16 11:47 ` cvs-commit at gcc dot gnu dot org
@ 2006-04-23 17:43 ` drepper at redhat dot com
2006-05-11 13:55 ` sjmunroe at us dot ibm dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: drepper at redhat dot com @ 2006-04-23 17:43 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2006-04-23 17:43 -------
You cannot change the rounding mode in library functions. This would make using
floating point operations in signal handlers unpredictable.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
` (6 preceding siblings ...)
2006-04-23 17:43 ` drepper at redhat dot com
@ 2006-05-11 13:55 ` sjmunroe at us dot ibm dot com
2006-06-14 18:29 ` sjmunroe at us dot ibm dot com
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2006-05-11 13:55 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From sjmunroe at us dot ibm dot com 2006-05-11 13:55 -------
hmmm, the alternative is to simulate the operation with integer ops. But this is
generic code...
I'll look to using the double rounding equivelent, instead of changing the
rounding mode inline, to get the desired effect. Slightly less efficient but
more general.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
` (7 preceding siblings ...)
2006-05-11 13:55 ` sjmunroe at us dot ibm dot com
@ 2006-06-14 18:29 ` sjmunroe at us dot ibm dot com
2007-01-17 13:00 ` cvs-commit at gcc dot gnu dot org
2007-02-18 13:54 ` aj at suse dot de
10 siblings, 0 replies; 12+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2006-06-14 18:29 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From sjmunroe at us dot ibm dot com 2006-06-14 18:29 -------
hhhmm its harder then I thought. The IBM extended format ABI states clearly that
it only works correctly in the default rounding mode (round to nearest).
Given that assumption it, seems unnecessary to guard against the user changing
the rounding to a non-default mode, as basic arithmatic and canonicalization may
be incorrect anyway.
So it seems the best solution is to simply remove the fesetround where possible.
This works for ceill, floorl, roundl, and truncl as they are never tested in the
non-default rounding mode. llroundl is clean because it is only using
feraiseexcept (handle overflow) and does not mess with rounding.
This also helps with Bugzilla 2749 as soft-fp does not provide fenv_libc.h. We
need to either remove the #include <fenv_libc.h> and any related fe* calls, or
replace <fenv_libc.h> with <fenv.h>
llrintl and rintl are another matter as these are explictly tested in all
rounding modes (and yes I did this to myself :( ).
At the moment I don't have a good answer for these yet other then disabling the
non-default rounding mode tests for IBM extended.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
` (8 preceding siblings ...)
2006-06-14 18:29 ` sjmunroe at us dot ibm dot com
@ 2007-01-17 13:00 ` cvs-commit at gcc dot gnu dot org
2007-02-18 13:54 ` aj at suse dot de
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2007-01-17 13:00 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2007-01-17 13:00 -------
Subject: Bug 2423
CVSROOT: /cvs/glibc
Module name: libc
Changes by: jakub@sourceware.org 2007-01-17 13:00:11
Modified files:
. : ChangeLog
sysdeps/ieee754/ldbl-128ibm: s_fabsl.c s_roundl.c s_truncl.c
s_copysignl.c s_ceill.c s_floorl.c
Log message:
[BZ #2749]
* sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: Include
<math_ldbl_opt.h>. Remove weak_alias. Use long_double_symbol macro.
(__copysignl): Use signbit() for comparison.
* sysdeps/ieee754/ldbl-128ibm/s_fabsl.c (__fabsl): Correct parms for
SET_LDOUBLE_WORDS64.
[BZ #2423, #2749]
* sysdeps/ieee754/ldbl-128ibm/s_ceill.c: Don't include <fenv_libc.h>.
(__ceill): Remove calls to fegetround(), fesetround().
* sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Likewise.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/ChangeLog.diff?cvsroot=glibc&r1=1.10480&r2=1.10481
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c.diff?cvsroot=glibc&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_roundl.c.diff?cvsroot=glibc&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_truncl.c.diff?cvsroot=glibc&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c.diff?cvsroot=glibc&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_ceill.c.diff?cvsroot=glibc&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/ieee754/ldbl-128ibm/s_floorl.c.diff?cvsroot=glibc&r1=1.3&r2=1.4
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
` (9 preceding siblings ...)
2007-01-17 13:00 ` cvs-commit at gcc dot gnu dot org
@ 2007-02-18 13:54 ` aj at suse dot de
10 siblings, 0 replies; 12+ messages in thread
From: aj at suse dot de @ 2007-02-18 13:54 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From aj at suse dot de 2007-02-18 13:54 -------
should be fixed now.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=2423
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-02-18 13:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-06 20:29 [Bug math/2423] New: Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4 sjmunroe at us dot ibm dot com
2006-03-06 20:44 ` [Bug math/2423] " sjmunroe at us dot ibm dot com
2006-03-06 20:48 ` sjmunroe at us dot ibm dot com
2006-03-06 20:55 ` sjmunroe at us dot ibm dot com
2006-03-07 8:24 ` cvs-commit at gcc dot gnu dot org
2006-03-16 11:46 ` cvs-commit at gcc dot gnu dot org
2006-03-16 11:47 ` cvs-commit at gcc dot gnu dot org
2006-04-23 17:43 ` drepper at redhat dot com
2006-05-11 13:55 ` sjmunroe at us dot ibm dot com
2006-06-14 18:29 ` sjmunroe at us dot ibm dot com
2007-01-17 13:00 ` cvs-commit at gcc dot gnu dot org
2007-02-18 13:54 ` aj at suse dot de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).