This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug math/2423] Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4


------- 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.


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