This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Set errno for scalb errors (bug 6803, bug 6804)
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Mon, 31 Mar 2014 16:44:14 +0200
- Subject: Re: Set errno for scalb errors (bug 6803, bug 6804)
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1403311356070 dot 15146 at digraph dot polyomino dot org dot uk>
On 03/31/2014 03:57 PM, Joseph S. Myers wrote:
> This patch fixes the default mode of scalb to set errno (bugs 6803 and
> 6804).
>
> Previously, the _LIB_VERSION == _SVID_ mode would set errno but only
> in some relevant cases, and with various peculiarities (such as errno
> setting when an exact infinity or zero result arises with an argument
> to scalb being an infinity). This patch leaves this mode
> bug-compatible, while making the default mode set errno in accordance
> with normal practice (so an exact infinity from an infinite argument
> is not an error, and nor is an exact zero result). gen-libm-test.pl
> is taught new notation such as ERRNO_PLUS_OFLOW to facilitate writing
> the tests of errno setting for underflow / overflow in libm-test.inc.
>
> Note that bug 6803 also covers scalbn and scalbln, but this patch only
> addresses the scalb parts of that bug (along with the whole of bug
> 6804).
OK, thanks,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: 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