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: Matt Turner <mattst88 at gmail dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 25 May 2016 15:36:45 +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>
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.
--
Joseph S. Myers
joseph@codesourcery.com