OSDN Git Service

Add sincosl() function to bionic. So that sincos optimization can
authorJing Yu <jingyu@google.com>
Thu, 3 Jun 2010 21:05:51 +0000 (14:05 -0700)
committerJing Yu <jingyu@google.com>
Thu, 3 Jun 2010 21:13:53 +0000 (14:13 -0700)
be enabled.

Change-Id: I19671a407dc96a92417c719da938ee0c1669bfb8

libc/docs/CHANGES.TXT
libm/include/math.h
libm/sincos.c

index 0599788..6799525 100644 (file)
@@ -5,7 +5,7 @@ Differences between current and Android 2.2:
 
 - <pthread.h>: Add reader/writer locks implementation.
 
-- <math.h>: Added sincos() and sincosf() (GLibc compatibility).
+- <math.h>: Added sincos(), sincosf() and sincosl() (GLibc compatibility).
 
 - <sys/sysinfo.h>: Added missing sysinfo() system call implementation
   (the function was already declared in the header though).
index 6c0d4eb..3b5660f 100644 (file)
@@ -484,6 +484,7 @@ long double truncl(long double);
 #ifdef _GNU_SOURCE
 void  sincos(double x, double *sin, double *cos);
 void  sincosf(float x, float *sin, float *cos);
+void  sincosl(long double x, long double *sin, long double *cos);
 #endif
 
 /* #endif */ /* __ISO_C_VISIBLE >= 1999 */
index ddbc420..116b151 100644 (file)
@@ -38,3 +38,9 @@ void  sincosf(float x, float *psin, float *pcos)
     *psin = sinf(x);
     *pcos = cosf(x);
 }
+
+void  sincosl(long double x, long double *psin, long double *pcos)
+{
+    *psin = sin(x);
+    *pcos = cos(x);
+}