This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix missing underflow from cexp (bug 14478)
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 03 Apr 2013 18:38:13 +0200
- Subject: Re: Fix missing underflow from cexp (bug 14478)
- References: <Pine dot LNX dot 4 dot 64 dot 1304031629370 dot 580 at digraph dot polyomino dot org dot uk>
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