source: trunk/libs/newlib/src/newlib/libm/math/wf_sincos.c @ 471

Last change on this file since 471 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 616 bytes
Line 
1/* sincos -- currently no more efficient than two separate calls to
2   sin and cos. */
3#include "fdlibm.h"
4#include <errno.h>
5
6#ifdef __STDC__
7        void sincosf(float x, float *sinx, float *cosx)
8#else
9        void sincosf(x, sinx, cosx)
10        float x;
11        float *sinx;
12        float *cosx;
13#endif
14{
15  *sinx = sinf (x);
16  *cosx = cosf (x);
17}
18
19#ifdef _DOUBLE_IS_32BITS
20
21#ifdef __STDC__
22        void sincos(double x, double *sinx, double *cosx)
23#else
24        void sincos(x, sinx, cosx)
25        double x;
26        double sinx;
27        double cosx;
28#endif
29{
30  *sinx = sinf((float) x);
31  *cosx = cosf((float) x);
32}
33#endif /* defined(_DOUBLE_IS_32BITS) */
Note: See TracBrowser for help on using the repository browser.