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 underflow from cexp (bug 14478)


On 04/03/2013 06:30 PM, Joseph S. Myers wrote:
Bug 14478 is failure of cexp functions to raise underflow exceptions
when the final result underflows (in at least one of real and
imaginary parts) but the multiplications generating that result were
exact so did not raise the underflow exception themselves.  (The test
in that bug is incorrect, since 0x1p-120 doesn't underflow for float,
but the bug itself is valid as shown by the tests this patch adds.)

This patch fixes this bug by checking for tiny results and multiplying
them by themselves to force underflow.  (If the tiny result is zero,
the multiplication is still OK: it won't cause underflow, but if it
wasn't exactly zero there must have been an earlier underflow to get
that value.)

Ok, 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]