Wed Jun 5 02:11:30 1996 Ulrich Drepper <drepper@cygnus.com>
authorroland <roland>
Wed, 5 Jun 1996 01:04:49 +0000 (01:04 +0000)
committerroland <roland>
Wed, 5 Jun 1996 01:04:49 +0000 (01:04 +0000)
* sysdeps/libm-ieee754/w_acoshl.c, sysdeps/libm-ieee754/w_acosl.c,
sysdeps/libm-ieee754/w_asinl.c, sysdeps/libm-ieee754/w_atan2l.c,
sysdeps/libm-ieee754/w_atanhl.c, sysdeps/libm-ieee754/w_cabsl.c,
sysdeps/libm-ieee754/w_coshl.c, sysdeps/libm-ieee754/w_dreml.c,
sysdeps/libm-ieee754/w_expl.c, sysdeps/libm-ieee754/w_fmodl.c,
sysdeps/libm-ieee754/w_gammal.c, sysdeps/libm-ieee754/w_gammal_r.c,
sysdeps/libm-ieee754/w_hypotl.c, sysdeps/libm-ieee754/w_j0l.c,
sysdeps/libm-ieee754/w_j1l.c, sysdeps/libm-ieee754/w_jnl.c,
sysdeps/libm-ieee754/w_lgammal.c, sysdeps/libm-ieee754/w_lgammal_r.c,
sysdeps/libm-ieee754/w_log10l.c, sysdeps/libm-ieee754/w_logl.c,
sysdeps/libm-ieee754/w_powl.c, sysdeps/libm-ieee754/w_remainderl.c,
sysdeps/libm-ieee754/w_scalbl.c, sysdeps/libm-ieee754/w_sinhl.c,
sysdeps/libm-ieee754/w_sqrtl.c: New files.  Wrapper functions
around long double function implementations.

sysdeps/libm-ieee754/w_acoshl.c [new file with mode: 0644]
sysdeps/libm-ieee754/w_asinl.c [new file with mode: 0644]
sysdeps/libm-ieee754/w_atanhl.c [new file with mode: 0644]
sysdeps/libm-ieee754/w_coshl.c [new file with mode: 0644]
sysdeps/libm-ieee754/w_dreml.c [new file with mode: 0644]
sysdeps/libm-ieee754/w_j1l.c [new file with mode: 0644]
sysdeps/libm-ieee754/w_jnl.c [new file with mode: 0644]
sysdeps/libm-ieee754/w_lgammal_r.c [new file with mode: 0644]

diff --git a/sysdeps/libm-ieee754/w_acoshl.c b/sysdeps/libm-ieee754/w_acoshl.c
new file mode 100644 (file)
index 0000000..a37d4c1
--- /dev/null
@@ -0,0 +1,47 @@
+/* w_acoshl.c -- long double version of w_acosh.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * wrapper acoshl(x)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       long double __acoshl(long double x)     /* wrapper acosh */
+#else
+       long double __acoshl(x)                 /* wrapper acosh */
+       long double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_acoshl(x);
+#else
+       long double z;
+       z = __ieee754_acoshl(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
+       if(x<1.0) {
+               return __kernel_standard(x,x,229); /* acoshl(x<1) */
+       } else
+           return z;
+#endif
+}
+weak_alias (__acoshl, acoshl)
diff --git a/sysdeps/libm-ieee754/w_asinl.c b/sysdeps/libm-ieee754/w_asinl.c
new file mode 100644 (file)
index 0000000..0ac3038
--- /dev/null
@@ -0,0 +1,49 @@
+/* w_asinl.c -- long double version of w_asin.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * wrapper asinl(x)
+ */
+
+
+#include "math.h"
+#include "math_private.h"
+
+
+#ifdef __STDC__
+       long double __asinl(long double x)      /* wrapper asinl */
+#else
+       long double __asinl(x)                  /* wrapper asinl */
+       long double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_asinl(x);
+#else
+       long double z;
+       z = __ieee754_asinl(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
+       if(fabsl(x)>1.0) {
+               return __kernel_standard(x,x,202); /* asinl(|x|>1) */
+       } else
+           return z;
+#endif
+}
+weak_alias (__asinl, asinl)
diff --git a/sysdeps/libm-ieee754/w_atanhl.c b/sysdeps/libm-ieee754/w_atanhl.c
new file mode 100644 (file)
index 0000000..d675fc6
--- /dev/null
@@ -0,0 +1,52 @@
+/* w_atanhl.c -- long double version of w_atanh.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * wrapper atanhl(x)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+
+#ifdef __STDC__
+       long double __atanhl(long double x)     /* wrapper atanhl */
+#else
+       long double __atanhl(x)                 /* wrapper atanhl */
+       long double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_atanhl(x);
+#else
+       long double z,y;
+       z = __ieee754_atanhl(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
+       y = fabsl(x);
+       if(y>=1.0) {
+           if(y>1.0)
+               return __kernel_standard(x,x,230); /* atanhl(|x|>1) */
+           else
+               return __kernel_standard(x,x,231); /* atanhl(|x|==1) */
+       } else
+           return z;
+#endif
+}
+weak_alias (__atanhl, atanhl)
diff --git a/sysdeps/libm-ieee754/w_coshl.c b/sysdeps/libm-ieee754/w_coshl.c
new file mode 100644 (file)
index 0000000..343d572
--- /dev/null
@@ -0,0 +1,47 @@
+/* w_acoshl.c -- long double version of w_acosh.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * wrapper coshl(x)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       long double __coshl(long double x)      /* wrapper coshl */
+#else
+       long double __coshl(x)                  /* wrapper coshl */
+       long double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_coshl(x);
+#else
+       long double z;
+       z = __ieee754_coshl(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
+       if(fabsl(x)>7.10475860073943863426e+02) {
+               return __kernel_standard(x,x,205); /* cosh overflow */
+       } else
+           return z;
+#endif
+}
+weak_alias (__coshl, coshl)
diff --git a/sysdeps/libm-ieee754/w_dreml.c b/sysdeps/libm-ieee754/w_dreml.c
new file mode 100644 (file)
index 0000000..aa73eed
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * dreml() wrapper for remainderl().
+ *
+ * Written by J.T. Conklin, <jtc@wimsey.com>
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ * Placed into the Public Domain, 1994.
+ */
+
+#include <math.h>
+
+long double
+__dreml(x, y)
+       long double x, y;
+{
+       return __remainderl(x, y);
+}
+weak_alias (__dreml, dreml)
diff --git a/sysdeps/libm-ieee754/w_j1l.c b/sysdeps/libm-ieee754/w_j1l.c
new file mode 100644 (file)
index 0000000..223ab79
--- /dev/null
@@ -0,0 +1,76 @@
+/* w_j1l.c -- long double version of w_j1.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * wrapper of j1l,y1l
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       long double __j1l(long double x)        /* wrapper j1l */
+#else
+       long double __j1l(x)                    /* wrapper j1l */
+       long double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_j1l(x);
+#else
+       long double z;
+       z = __ieee754_j1l(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
+       if(fabsl(x)>X_TLOSS) {
+               return __kernel_standard(x,x,236); /* j1(|x|>X_TLOSS) */
+       } else
+           return z;
+#endif
+}
+weak_alias (__j1l, j1l)
+
+#ifdef __STDC__
+       long double __y1l(long double x)        /* wrapper y1l */
+#else
+       long double __y1l(x)                    /* wrapper y1l */
+       long double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_y1l(x);
+#else
+       long double z;
+       z = __ieee754_y1l(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
+        if(x <= 0.0){
+                if(x==0.0)
+                    /* d= -one/(x-x); */
+                    return __kernel_standard(x,x,210);
+                else
+                    /* d = zero/(x-x); */
+                    return __kernel_standard(x,x,211);
+        }
+       if(x>X_TLOSS) {
+               return __kernel_standard(x,x,237); /* y1(x>X_TLOSS) */
+       } else
+           return z;
+#endif
+}
+weak_alias (__y1l, y1l)
diff --git a/sysdeps/libm-ieee754/w_jnl.c b/sysdeps/libm-ieee754/w_jnl.c
new file mode 100644 (file)
index 0000000..0a243db
--- /dev/null
@@ -0,0 +1,98 @@
+/* w_jnl.c -- long double version of w_jn.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * wrapper jn(int n, double x), yn(int n, double x)
+ * floating point Bessel's function of the 1st and 2nd kind
+ * of order n
+ *
+ * Special cases:
+ *     y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
+ *     y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
+ * Note 2. About jn(n,x), yn(n,x)
+ *     For n=0, j0(x) is called,
+ *     for n=1, j1(x) is called,
+ *     for n<x, forward recursion us used starting
+ *     from values of j0(x) and j1(x).
+ *     for n>x, a continued fraction approximation to
+ *     j(n,x)/j(n-1,x) is evaluated and then backward
+ *     recursion is used starting from a supposed value
+ *     for j(n,x). The resulting value of j(0,x) is
+ *     compared with the actual value to correct the
+ *     supposed value of j(n,x).
+ *
+ *     yn(n,x) is similar in all respects, except
+ *     that forward recursion is used for all
+ *     values of n>1.
+ *
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       long double __jnl(int n, long double x) /* wrapper jnl */
+#else
+       long double __jnl(n,x)                  /* wrapper jnl */
+       long double x; int n;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_jnl(n,x);
+#else
+       long double z;
+       z = __ieee754_jnl(n,x);
+       if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
+       if(fabsl(x)>X_TLOSS) {
+           return __kernel_standard((double)n,x,238); /* jn(|x|>X_TLOSS,n) */
+       } else
+           return z;
+#endif
+}
+weak_alias (__jnl, jnl)
+
+#ifdef __STDC__
+       long double __ynl(int n, long double x) /* wrapper ynl */
+#else
+       long double __ynl(n,x)                  /* wrapper ynl */
+       long double x; int n;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_ynl(n,x);
+#else
+       long double z;
+       z = __ieee754_ynl(n,x);
+       if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
+        if(x <= 0.0){
+                if(x==0.0)
+                    /* d= -one/(x-x); */
+                    return __kernel_standard((double)n,x,212);
+                else
+                    /* d = zero/(x-x); */
+                    return __kernel_standard((double)n,x,213);
+        }
+       if(x>X_TLOSS) {
+           return __kernel_standard((double)n,x,239); /* yn(x>X_TLOSS,n) */
+       } else
+           return z;
+#endif
+}
+weak_alias (__ynl, ynl)
diff --git a/sysdeps/libm-ieee754/w_lgammal_r.c b/sysdeps/libm-ieee754/w_lgammal_r.c
new file mode 100644 (file)
index 0000000..71f5c00
--- /dev/null
@@ -0,0 +1,52 @@
+/* w_lgammal_r.c -- long double version of w_lgamma_r.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * wrapper long double lgammal_r(long double x, int *signgamp)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+
+#ifdef __STDC__
+       long double __lgammal_r(long double x, int *signgamp)
+               /* wrapper lgamma_r */
+#else
+       long double __lgammal_r(x,signgamp)             /* wrapper lgamma_r */
+        long double x; int *signgamp;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_lgammal_r(x,signgamp);
+#else
+        long double y;
+        y = __ieee754_lgammal_r(x,signgamp);
+        if(_LIB_VERSION == _IEEE_) return y;
+        if(!__finitel(y)&&__finitel(x)) {
+            if(__floorl(x)==x&&x<=0.0)
+                return __kernel_standard(x,x,215); /* lgamma pole */
+            else
+                return __kernel_standard(x,x,214); /* lgamma overflow */
+        } else
+            return y;
+#endif
+}
+weak_alias (__lgammal_r, lgammal_r)