2 #include <aros/debug.h>
5 #include "math_private.h"
7 void sincos(double x
, double *sin
, double *cos
)
17 if(ix
<= 0x3fe921fb) {
18 if(ix
<0x3e400000) /* |x| < 2**-27 */
19 {if((int)x
==0) { *sin
=x
; *cos
=1.0; return; }} /* generate inexact */
20 *sin
= __kernel_sin(x
,z
,0);
21 *cos
= __kernel_cos(x
,z
);
25 /* cos(Inf or NaN) is NaN */
26 else if (ix
>=0x7ff00000) {*sin
= *cos
= x
-x
; return; }
28 /* argument reduction needed */
30 n
= __ieee754_rem_pio2(x
,y
);
32 case 0: *sin
= __kernel_sin(y
[0],y
[1],1); *cos
= __kernel_cos(y
[0],y
[1]); break;
33 case 1: *sin
= __kernel_cos(y
[0],y
[1]); *cos
= -__kernel_sin(y
[0],y
[1],1); break;
34 case 2: *sin
= -__kernel_sin(y
[0],y
[1],1); *cos
= -__kernel_cos(y
[0],y
[1]); break;
36 *sin
= -__kernel_cos(y
[0],y
[1]); *cos
= __kernel_sin(y
[0],y
[1],1);