This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/3976] libm rounding modes do not work correctly for many archs
- From: "joseph at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 27 Oct 2008 12:42:02 -0000
- Subject: [Bug math/3976] libm rounding modes do not work correctly for many archs
- References: <20070206131410.3976.madcoder@debian.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From joseph at codesourcery dot com 2008-10-27 12:42 -------
Subject: Re: libm rounding modes do not work correctly for
many archs
On Mon, 27 Oct 2008, vincent+libc at vinc17 dot org wrote:
> So, this just means that an implementation doesn't need to return a result
> rounded to the correct direction (this is implementation-defined). Still it
> should return an approximate value whatever the rounding direction mode is, and
> not behave erratically.
Furthermore, some functions whose implementations only work in
round-to-nearest mode do save the mode then set round-to-nearest using
feholdexcept and fesetround (e.g. sysdeps/ieee754/dbl-64/e_exp2.c). I
think this is the best thing to do in such cases. (Regarding the issue of
rounding modes in signal handlers, I think the best thing is for ABI
documents to make explicit that library functions may temporarily save and
restore rounding modes; that's what is being done in the Power
Architecture ABI document being worked on, to document what the de facto
ABI is right now.)
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3976
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.