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/mathfp/sf_sincos.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 newlib/libm/mathfp/sf_sincos.c (limited to 'newlib/libm/mathfp/sf_sincos.c') diff --git a/newlib/libm/mathfp/sf_sincos.c b/newlib/libm/mathfp/sf_sincos.c new file mode 100644 index 000000000..e192b4b44 --- /dev/null +++ b/newlib/libm/mathfp/sf_sincos.c @@ -0,0 +1,39 @@ + +/* @(#)z_sinf.c 1.0 98/08/13 */ +/****************************************************************** + * Sine + * + * Input: + * x - floating point value + * + * Output: + * sine of x + * + * Description: + * This routine returns the sine of x. + * + *****************************************************************/ + +#include "fdlibm.h" +#include "zmath.h" + +void +_DEFUN (sincosf, (x, sinx, cosx), + float x _AND + float *sinx _AND + float *cosx) +{ + *sinx = sin (x); + *cosx = cos (x); +} + +#ifdef _DOUBLE_IS_32BITS + +void +sincos (double x, double *sinx, double *cosx) +{ + *sinx = (double) sinf ((float) x); + *cosx = (double) cosf ((float) x); +} + +#endif /* defined(_DOUBLE_IS_32BITS) */ -- cgit v1.2.3