From 9946750609c858dad0150da55645c4331392cf0d Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Thu, 3 Jun 2010 14:05:51 -0700 Subject: [PATCH] Add sincosl() function to bionic. So that sincos optimization can be enabled. Change-Id: I19671a407dc96a92417c719da938ee0c1669bfb8 --- libc/docs/CHANGES.TXT | 2 +- libm/include/math.h | 1 + libm/sincos.c | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libc/docs/CHANGES.TXT b/libc/docs/CHANGES.TXT index 05997887f..6799525a4 100644 --- a/libc/docs/CHANGES.TXT +++ b/libc/docs/CHANGES.TXT @@ -5,7 +5,7 @@ Differences between current and Android 2.2: - : Add reader/writer locks implementation. -- : Added sincos() and sincosf() (GLibc compatibility). +- : Added sincos(), sincosf() and sincosl() (GLibc compatibility). - : Added missing sysinfo() system call implementation (the function was already declared in the header though). diff --git a/libm/include/math.h b/libm/include/math.h index 6c0d4eb20..3b5660f30 100644 --- a/libm/include/math.h +++ b/libm/include/math.h @@ -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 */ diff --git a/libm/sincos.c b/libm/sincos.c index ddbc420dc..116b151e2 100644 --- a/libm/sincos.c +++ b/libm/sincos.c @@ -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); +}