This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/3] Optimize trunc() and truncf().
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: Matt Turner <mattst88 at gmail dot com>, <libc-alpha at sourceware dot org>
- Date: Wed, 25 May 2016 17:24:55 +0000
- Subject: Re: [PATCH 1/3] Optimize trunc() and truncf().
- Authentication-results: sourceware.org; auth=none
- References: <1464139950-31943-1-git-send-email-mattst88 at gmail dot com> <alpine dot DEB dot 2 dot 20 dot 1605251535220 dot 2813 at digraph dot polyomino dot org dot uk> <20160525172044 dot GC26300 at vapier dot lan>
On Wed, 25 May 2016, Mike Frysinger wrote:
> On 25 May 2016 15:36, Joseph Myers wrote:
> > On Tue, 24 May 2016, Matt Turner wrote:
> > > - else
> > > - {
> > > - if (j0 == 0x400)
> > > - /* x is inf or NaN. */
> > > - return x + x;
> > > - }
> >
> > You're removing too much code here. You need to keep this addition in the
> > NaN case to ensure that signaling NaNs raise "invalid" and get converted
> > to quiet NaNs in the process.
>
> does this mean current test coverage is insufficient ?
Yes. I intend to add sNaN support to libm-test.inc at some point if noone
else gets there first; no doubt this would then show up lots of bugs in
existing code. Cf.
<https://sourceware.org/ml/libc-ports/2013-04/msg00008.html>, but that
would need completely reworking now for current libm-test.
--
Joseph S. Myers
joseph@codesourcery.com