Fix sinf, cosf, sincosf,tanf on x86 (BZ#13852)

Joseph S. Myers jsm@polyomino.org.uk
Thu Mar 15 16:50:00 GMT 2012


On Thu, 15 Mar 2012, Andreas Jaeger wrote:

> This update fixes sinf, cosf, tanf and sincosf to not use the x87 fpu and 
> thus work with large inputs as well. It adds a few new ULPS with 
> values 1 or 2.

Looks good to me.  Hopefully tan (double) (x86) should also be 
straightforward to fix using the _53bit macros.

> +#ifndef TEST_LDOUBLE
> +  /* Enable for long double once x86 and x86-64 implementations are fixed.  */
> +  TEST_f_f (cos, 0x1p65, 0.998886220660580136106421721793L);
> +  TEST_f_f (cos, -0x1p65, 0.998886220660580136106421721793L);

Note that 30 decimal places won't be enough for ldbl-128 or ldbl-128ibm 
(you need at least 35 places, I generally use 40).  Though I can always 
fix constants with too few decimal places when enabling tests for long 
double along with adding ldbl-96 implementations.

-- 
Joseph S. Myers
jsm@polyomino.org.uk



More information about the Libc-alpha mailing list