[PATCH 4/4] Use copysign instead of ternary for some sin/cos input ranges

Manfred mx2927@gmail.com
Wed Sep 28 12:59:00 GMT 2016



On 9/27/2016 7:49 PM, Siddhesh Poyarekar wrote:
> @@ -479,7 +479,7 @@ __sin (double x)
>      {
>        res = do_sin (x, 0, &cor);
>        retval = (res == res + 1.096 * cor) ? res : slow1 (x);
> -      retval = m > 0 ? retval : -retval;
> +      retval = __copysign (retval, x);
>      }				/*   else  if (k < 0x3feb6000)    */
>
The ternary uses m, __copysign uses x. It could be correct (I didn't 
check the full context), but just in case...



More information about the Libc-alpha mailing list