This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix scalb spurious "invalid" exceptions (bug 16770)
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Sat, 29 Mar 2014 18:13:52 +0100
- Subject: Re: Fix scalb spurious "invalid" exceptions (bug 16770)
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1403291620110 dot 11808 at digraph dot polyomino dot org dot uk>
On 03/29/2014 05:21 PM, Joseph S. Myers wrote:
> This patch fixes bug 16770, spurious "invalid" exceptions from scalb
> when testing whether the second argument is an integer, by inserting
> appropriate range checks to determine whether a cast to int is safe.
> (Note that invalid_fn is a function that handles both nonintegers and
> large integers, distinguishing them reliably using functions such as
> __rint; note also that there are no issues with scalb needing to avoid
> spurious "inexact" exceptions - it's an old-POSIX XSI function, not a
> standard C function bound to an IEEE 754 operation - although the
> return value is still fully determined.)
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