[PATCH 1/4] alpha: fix ceil on sNaN input [committed/2.23]

Richard Henderson rth@twiddle.net
Fri Dec 9 04:02:00 GMT 2016


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.


r~



More information about the Libc-alpha mailing list