1 /* @(#)s_sincos.c 5.1 13/07/15 */
3 * ====================================================
4 * Copyright (C) 2013 Elliot Saba. All rights reserved.
6 * Developed at the University of Washington.
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
10 * ====================================================
13 #include <aros/debug.h>
17 #define INLINE_REM_PIO2
18 #include "math_private.h"
19 #include "e_rem_pio2.c"
23 sincos(double x
, double *sn
, double *cs
)
33 if(ix
<= 0x3fe921fb) {
34 if (ix
< 0x3e400000) { /* |x| < 2**-27 */
35 if ((int)x
== 0) { /* Generate inexact. */
41 __kernel_sincos(x
, 0, 0, sn
, cs
);
45 /* If x = Inf or NaN, then sin(x) = NaN and cos(x) = NaN. */
46 if (ix
>= 0x7ff00000) {
52 /* Argument reduction. */
53 n
= __ieee754_rem_pio2(x
, y
);
57 __kernel_sincos(y
[0], y
[1], 1, sn
, cs
);
60 __kernel_sincos(y
[0], y
[1], 1, cs
, sn
);
64 __kernel_sincos(y
[0], y
[1], 1, sn
, cs
);
69 __kernel_sincos(y
[0], y
[1], 1, cs
, sn
);
75 #if (LDBL_MANT_DIG == 53)
76 AROS_MAKE_ASM_SYM(typeof(sincosl
), sincosl
, AROS_CSYM_FROM_ASM_NAME(sincosl
), AROS_CSYM_FROM_ASM_NAME(sincos
));
77 AROS_EXPORT_ASM_SYM(AROS_CSYM_FROM_ASM_NAME(sincosl
));