Welcome to mirror list, hosted at ThFree Co, Russian Federation.

wf_sincos.c « math « libm « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 477c604019f750b437aa6b0d3e8c8733e7634a0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* sincos -- currently no more efficient than two separate calls to
   sin and cos. */
#include "fdlibm.h"
#include <errno.h>

#ifdef __STDC__
	void sincosf(float x, float *sinx, float *cosx)
#else
	void sincosf(x, sinx, cosx)
	float x;
        float *sinx;
        float *cosx;
#endif
{
  *sinx = sinf (x);
  *cosx = cosf (x);
}

#ifdef _DOUBLE_IS_32BITS

#ifdef __STDC__
	void sincos(double x, double *sinx, double *cosx)
#else
	void sincos(x, sinx, cosx)
	double x;
        double sinx;
        double cosx;
#endif
{
  *sinx = sinf((float) x);
  *cosx = cosf((float) x);
}
#endif /* defined(_DOUBLE_IS_32BITS) */