diff options
author | Bruno Haible <bruno@clisp.org> | 2011-10-11 11:15:25 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-10-11 11:15:25 +0200 |
commit | bf552416ee94157bd9aa4045b1622234fcf28e91 (patch) | |
tree | 479d58d14fe0956e9ed7bddb60cf6d7db617d7f6 /lib/acosl.c | |
parent | 1f5817b9653bcf4e6ad534ce36df9a10c6f5fb6e (diff) | |
download | gnulib-bf552416ee94157bd9aa4045b1622234fcf28e91.tar.gz |
acosl: Simplify for platforms where 'long double' == 'double'.
* lib/acosl.c (acosl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
alternative implementation.
* m4/acosl.m4 (gl_FUNC_ACOSL): Require gl_LONG_DOUBLE_VS_DOUBLE.
Determine ACOSL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
* modules/acosl (Depends-on): Add acos. Update conditions.
Diffstat (limited to 'lib/acosl.c')
-rw-r--r-- | lib/acosl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/acosl.c b/lib/acosl.c index 260a4370eb..c864631377 100644 --- a/lib/acosl.c +++ b/lib/acosl.c @@ -14,6 +14,16 @@ /* Specification. */ #include <math.h> +#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE + +long double +acosl (long double x) +{ + return acos (x); +} + +#else + /* Long double expansions contributed by Stephen L. Moshier <moshier@na-net.ornl.gov> @@ -186,6 +196,8 @@ acosl (long double x) return 2 * asinl (sqrtl ((1 - x) / 2)); } +#endif + #if 0 int main (void) |