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/4] alpha: fix ceil on sNaN input [committed/2.23]


On 08 Dec 2016 20:01, Richard Henderson wrote:
> On 12/08/2016 10:51 AM, Mike Frysinger wrote:
> >  __ceil (double x)
> >  {
> > +  if (isnan (x))
> > +    return x + x;
> > +
> >    if (isless (fabs (x), 9007199254740992.0))	/* 1 << DBL_MANT_DIG */
> >      {
> >        double tmp1, new_x;
> 
> Probably better to test for nan in the else of this if, since the isless is 
> surely more likely than the nan.
> 
> That goes for all of the changes.

i guess fabs(NaN) and isless(NaN, ...) isn't a problem ?

would it be equiv to do ?
	if (__glibc_unlikely (isnan (x)))
-mike

Attachment: signature.asc
Description: Digital signature


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