From d3bd3632ac06bdb7f76b13494873b3567edabcbf Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Fri, 16 Aug 2002 21:29:45 +0000 Subject: * libc/sys/linux/cmath: New directory. * libc/sys/linux/include/cmathcalls.h: New file. * libc/sys/linux/include/complex.h: New file. * libc/sys/linux/machine/i386/huge_val.h: New file * libm/math/w_sincos.c: New file * libm/math/wf_sincos.c: New file * libm/mathfp/s_sincos.c: New file * libm/mathfp/sf_sincos.c: New file * Makefile.am (LIBC_OBJECTLISTS): Add cmath/objectlist.awk.in. * libc/include/math.h: Add sincos and sincosf declarations. * libc/sys/linux/Makefile.am (SUBDIRS): Add cmath. (SUBLIBS): Likewise. * libc/sys/linux/configure.in (AC_OUTPUT): Add cmath. * libm/math/Makefile.am (src): Add w_sincos.c. (fsrc): Add wf_sincos.c. * libm/mathfp/Makefile.am (src): Add s_sincos.c (fsrc): Add sf_sincos.c. --- newlib/libm/math/wf_sincos.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 newlib/libm/math/wf_sincos.c (limited to 'newlib/libm/math/wf_sincos.c') diff --git a/newlib/libm/math/wf_sincos.c b/newlib/libm/math/wf_sincos.c new file mode 100644 index 000000000..477c60401 --- /dev/null +++ b/newlib/libm/math/wf_sincos.c @@ -0,0 +1,33 @@ +/* sincos -- currently no more efficient than two separate calls to + sin and cos. */ +#include "fdlibm.h" +#include + +#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) */ -- cgit v1.2.3