This is the mail archive of the libc-alpha@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]

Re: Fix missing exceptions from exp (bugs 13787, 13922, 14036)


On 05/05/2012 07:20 PM, Joseph S. Myers wrote:
There are various bugs for missing overflow and underflow exceptions
on exp-family functions, resulting from the wrappers checking for
overflow and underflow before calling the functions such as
__ieee754_exp, and in the overflow/underflow cases then calling
__kernel_standard so setting errno but missing out on the exceptions.

I propose this patch to fix these bugs by using the approach of some
other wrappers, checking for overflow and underflow based on the
results after calling __ieee754_exp.  This in turn requires changes to
the x86/x86_64 code (on top of my previous patch
<http://sourceware.org/ml/libc-alpha/2012-05/msg00184.html>  to use .S
files for those) to avoid spurious overflows in internal calculations
for very large (positive or negative) exponents.  The long double
wrappers not changed already check for overflow/underflow after
calling __ieee754_expl, so should not need any changes.

Tested x86_64 and x86.  The underflow part of bug 14036 isn't fixed by
this patch but hopefully Andreas's patch to use -frounding-math will,
together with this patch, fix that problem; if not, further
investigation will be needed.

Looks fine, thanks,


Andreas
--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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