This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Optimize trunc() and truncf().


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]