summaryrefslogtreecommitdiff
path: root/libm/ldouble_wrappers.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-03-18 22:32:22 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-03-18 22:32:22 +0100
commit6c4538905e65ceb203f59aaa9a61728e81c6bc0a (patch)
tree241337035488fb2b179340d79a5ec4539f5fc09a /libm/ldouble_wrappers.c
parent78e6494c2cf677d170a5c4ce0f46d152d478abc0 (diff)
libm: Add missing C99 float/ld wrappers
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libm/ldouble_wrappers.c')
-rw-r--r--libm/ldouble_wrappers.c58
1 files changed, 54 insertions, 4 deletions
diff --git a/libm/ldouble_wrappers.c b/libm/ldouble_wrappers.c
index 118a78f64..b4215cbf3 100644
--- a/libm/ldouble_wrappers.c
+++ b/libm/ldouble_wrappers.c
@@ -42,6 +42,15 @@ long long func##l(long double x) \
return func((double) x); \
}
+#ifndef __DO_XSI_MATH__
+# undef L_j0l /* long double j0l(long double x); */
+# undef L_j1l /* long double j1l(long double x); */
+# undef L_jnl /* long double jnl(int n, long double x); */
+# undef L_y0l /* long double y0l(long double x); */
+# undef L_y1l /* long double y1l(long double x); */
+# undef L_ynl /* long double ynl(int n, long double x); */
+#endif
+
/* Implement the following, as defined by SuSv3 */
#if 0
long double acoshl(long double);
@@ -156,6 +165,7 @@ WRAPPER1(cosh)
#ifdef L_cosl
WRAPPER1(cos)
+libm_hidden_def(cosl)
#endif
#ifdef L_erfcl
@@ -172,6 +182,7 @@ WRAPPER1(exp2)
#ifdef L_expl
WRAPPER1(exp)
+libm_hidden_def(expl)
#endif
#ifdef L_expm1l
@@ -222,12 +233,28 @@ WRAPPER1(gamma)
#ifdef L_hypotl
WRAPPER2(hypot)
+libm_hidden_def(hypotl)
#endif
#ifdef L_ilogbl
int_WRAPPER1(ilogb)
#endif
+#ifdef L_j0l
+ WRAPPER1(j0)
+#endif
+
+#ifdef L_j1l
+ WRAPPER1(j1)
+#endif
+
+#ifdef L_jnl
+long double jnl(int n, long double x)
+{
+ return (long double) jn(n, (double)x);
+}
+#endif
+
#ifdef L_ldexpl
long double ldexpl (long double x, int ex)
{
@@ -291,12 +318,18 @@ WRAPPER1(nearbyint)
#ifdef L_nextafterl
WRAPPER2(nextafter)
+libm_hidden_def(nextafterl)
#endif
-/* Disabled in Makefile.in */
-#if 0 /* def L_nexttowardl */
-WRAPPER2(nexttoward)
-libm_hidden_def(nexttowardl)
+#ifdef L_nexttowardl
+# if 0 /* TODO */
+strong_alias(nextafterl, nexttowardl)
+# else
+long double nexttowardl(long double x, long double y)
+{
+ return nextafterl(x, y);
+}
+#endif
#endif
#ifdef L_powl
@@ -344,6 +377,7 @@ WRAPPER1(sinh)
#ifdef L_sinl
WRAPPER1(sin)
+libm_hidden_def(sinl)
#endif
#ifdef L_sqrtl
@@ -370,6 +404,22 @@ WRAPPER1(trunc)
WRAPPER1(significand)
#endif
+#ifdef L_y0l
+WRAPPER1(y0)
+#endif
+
+#ifdef L_y1l
+WRAPPER1(y1)
+#endif
+
+#ifdef L_ynl
+long double ynl(int n, long double x)
+{
+ return (long double) yn(n, (double)x);
+}
+#endif
+
+
#if defined __DO_C99_MATH__ && !defined __NO_LONG_DOUBLE_MATH
# ifdef L___fpclassifyl