From 5657cc58e5e135bba85c9a7045e10d8de4b1be0a Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 15 Mar 2012 02:38:42 -0400 Subject: [PATCH] implement sincosf and sincosl functions; add prototypes presumably broken gcc may generate calls to these, and it's said that ffmpeg makes use of sincosf. --- include/math.h | 3 +++ src/linux/sincosf.c | 8 ++++++++ src/linux/sincosl.c | 8 ++++++++ 3 files changed, 19 insertions(+) create mode 100644 src/linux/sincosf.c create mode 100644 src/linux/sincosl.c diff --git a/include/math.h b/include/math.h index f320b8e9..e9871516 100644 --- a/include/math.h +++ b/include/math.h @@ -382,6 +382,9 @@ long double ynl(int, long double); double scalb(double, double); float scalbf(float, float); long double scalbl(long double, long double); +void sincosf(float, float *, float *); +void sincos(double, double *, double *); +void sincosl(long double, long double *, long double *); #endif #ifdef __cplusplus diff --git a/src/linux/sincosf.c b/src/linux/sincosf.c new file mode 100644 index 00000000..5d8d4458 --- /dev/null +++ b/src/linux/sincosf.c @@ -0,0 +1,8 @@ +#define _GNU_SOURCE +#include + +void sincosf(float t, float *y, float *x) +{ + *y = sinf(t); + *x = cosf(t); +} diff --git a/src/linux/sincosl.c b/src/linux/sincosl.c new file mode 100644 index 00000000..2bfc4862 --- /dev/null +++ b/src/linux/sincosl.c @@ -0,0 +1,8 @@ +#define _GNU_SOURCE +#include + +void sincosl(long double t, long double *y, long double *x) +{ + *y = sinl(t); + *x = cosl(t); +} -- 2.25.1