فهرست منبع

workaround gcc bug 46926 by providing a dumb sincos implementation

note that this library itself is built with -ffreestanding so sincos.c
should not be miscompiled even if the gcc used to compile musl has
this bug.
Rich Felker 14 سال پیش
والد
کامیت
13e8459232
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      src/linux/sincos.c

+ 8 - 0
src/linux/sincos.c

@@ -0,0 +1,8 @@
+#define _GNU_SOURCE
+#include <math.h>
+
+void sincos(double t, double *y, double *x)
+{
+	*y = sin(t);
+	*x = cos(t);
+}