Wrapper for $1
authordrepper <drepper>
Sat, 17 Feb 2001 01:42:49 +0000 (01:42 +0000)
committerdrepper <drepper>
Sat, 17 Feb 2001 01:42:49 +0000 (01:42 +0000)
20 files changed:
sysdeps/generic/w_hypot.c [new file with mode: 0644]
sysdeps/generic/w_hypotf.c [new file with mode: 0644]
sysdeps/generic/w_hypotl.c [new file with mode: 0644]
sysdeps/generic/w_j0.c [new file with mode: 0644]
sysdeps/generic/w_j0f.c [new file with mode: 0644]
sysdeps/generic/w_j0l.c [new file with mode: 0644]
sysdeps/generic/w_j1.c [new file with mode: 0644]
sysdeps/generic/w_j1f.c [new file with mode: 0644]
sysdeps/generic/w_j1l.c [new file with mode: 0644]
sysdeps/generic/w_jn.c [new file with mode: 0644]
sysdeps/generic/w_jnf.c [new file with mode: 0644]
sysdeps/generic/w_jnl.c [new file with mode: 0644]
sysdeps/generic/w_lgamma.c [new file with mode: 0644]
sysdeps/generic/w_lgammaf.c [new file with mode: 0644]
sysdeps/generic/w_lgammaf_r.c [new file with mode: 0644]
sysdeps/generic/w_lgammal.c [new file with mode: 0644]
sysdeps/generic/w_lgammal_r.c [new file with mode: 0644]
sysdeps/generic/w_log10.c [new file with mode: 0644]
sysdeps/generic/w_log10f.c [new file with mode: 0644]
sysdeps/generic/w_log10l.c [new file with mode: 0644]

diff --git a/sysdeps/generic/w_hypot.c b/sysdeps/generic/w_hypot.c
new file mode 100644 (file)
index 0000000..e91db17
--- /dev/null
@@ -0,0 +1,48 @@
+/* @(#)w_hypot.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * 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: w_hypot.c,v 1.6 1995/05/10 20:49:07 jtc Exp $";
+#endif
+
+/*
+ * wrapper hypot(x,y)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+
+#ifdef __STDC__
+       double __hypot(double x, double y)/* wrapper hypot */
+#else
+       double __hypot(x,y)             /* wrapper hypot */
+       double x,y;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_hypot(x,y);
+#else
+       double z;
+       z = __ieee754_hypot(x,y);
+       if(_LIB_VERSION == _IEEE_) return z;
+       if((!__finite(z))&&__finite(x)&&__finite(y))
+           return __kernel_standard(x,y,4); /* hypot overflow */
+       else
+           return z;
+#endif
+}
+weak_alias (__hypot, hypot)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__hypot, __hypotl)
+weak_alias (__hypot, hypotl)
+#endif
diff --git a/sysdeps/generic/w_hypotf.c b/sysdeps/generic/w_hypotf.c
new file mode 100644 (file)
index 0000000..a7e5c1f
--- /dev/null
@@ -0,0 +1,48 @@
+/* w_hypotf.c -- float version of w_hypot.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@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: w_hypotf.c,v 1.3 1995/05/10 20:49:09 jtc Exp $";
+#endif
+
+/*
+ * wrapper hypotf(x,y)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+
+#ifdef __STDC__
+       float __hypotf(float x, float y)        /* wrapper hypotf */
+#else
+       float __hypotf(x,y)             /* wrapper hypotf */
+       float x,y;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_hypotf(x,y);
+#else
+       float z;
+       z = __ieee754_hypotf(x,y);
+       if(_LIB_VERSION == _IEEE_) return z;
+       if((!__finitef(z))&&__finitef(x)&&__finitef(y))
+           /* hypot overflow */
+           return (float)__kernel_standard((double)x,(double)y,104);
+       else
+           return z;
+#endif
+}
+weak_alias (__hypotf, hypotf)
diff --git a/sysdeps/generic/w_hypotl.c b/sysdeps/generic/w_hypotl.c
new file mode 100644 (file)
index 0000000..2ec215f
--- /dev/null
@@ -0,0 +1,48 @@
+/* w_hypotl.c -- long double version of w_hypot.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 hypotl(x,y)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+
+#ifdef __STDC__
+       long double __hypotl(long double x, long double y)/* wrapper hypotl */
+#else
+       long double __hypotl(x,y)                        /* wrapper hypotl */
+       long double x,y;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_hypotl(x,y);
+#else
+       long double z;
+       z = __ieee754_hypotl(x,y);
+       if(_LIB_VERSION == _IEEE_) return z;
+       if((!__finitel(z))&&__finitel(x)&&__finitel(y))
+           return __kernel_standard(x,y,204); /* hypot overflow */
+       else
+           return z;
+#endif
+}
+weak_alias (__hypotl, hypotl)
diff --git a/sysdeps/generic/w_j0.c b/sysdeps/generic/w_j0.c
new file mode 100644 (file)
index 0000000..5a01876
--- /dev/null
@@ -0,0 +1,76 @@
+/* @(#)w_j0.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * 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: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $";
+#endif
+
+/*
+ * wrapper j0(double x), y0(double x)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       double j0(double x)             /* wrapper j0 */
+#else
+       double j0(x)                    /* wrapper j0 */
+       double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_j0(x);
+#else
+       double z = __ieee754_j0(x);
+       if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
+       if(fabs(x)>X_TLOSS) {
+               return __kernel_standard(x,x,34); /* j0(|x|>X_TLOSS) */
+       } else
+           return z;
+#endif
+}
+#ifdef NO_LONG_DOUBLE
+strong_alias (j0, j0l)
+#endif
+
+
+#ifdef __STDC__
+       double y0(double x)             /* wrapper y0 */
+#else
+       double y0(x)                    /* wrapper y0 */
+       double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_y0(x);
+#else
+       double z;
+       z = __ieee754_y0(x);
+       if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
+        if(x <= 0.0){
+                if(x==0.0)
+                    /* d= -one/(x-x); */
+                    return __kernel_standard(x,x,8);
+                else
+                    /* d = zero/(x-x); */
+                    return __kernel_standard(x,x,9);
+        }
+       if(x>X_TLOSS) {
+               return __kernel_standard(x,x,35); /* y0(x>X_TLOSS) */
+       } else
+           return z;
+#endif
+}
+#ifdef NO_LONG_DOUBLE
+strong_alias (y0, y0l)
+#endif
diff --git a/sysdeps/generic/w_j0f.c b/sysdeps/generic/w_j0f.c
new file mode 100644 (file)
index 0000000..32e2eeb
--- /dev/null
@@ -0,0 +1,74 @@
+/* w_j0f.c -- float version of w_j0.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@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: w_j0f.c,v 1.3 1995/05/10 20:49:13 jtc Exp $";
+#endif
+
+/*
+ * wrapper j0f(float x), y0f(float x)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       float j0f(float x)              /* wrapper j0f */
+#else
+       float j0f(x)                    /* wrapper j0f */
+       float x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_j0f(x);
+#else
+       float z = __ieee754_j0f(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
+       if(fabsf(x)>(float)X_TLOSS) {
+               /* j0f(|x|>X_TLOSS) */
+               return (float)__kernel_standard((double)x,(double)x,134);
+       } else
+           return z;
+#endif
+}
+
+#ifdef __STDC__
+       float y0f(float x)              /* wrapper y0f */
+#else
+       float y0f(x)                    /* wrapper y0f */
+       float x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_y0f(x);
+#else
+       float z;
+       z = __ieee754_y0f(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
+        if(x <= (float)0.0){
+                if(x==(float)0.0)
+                    /* d= -one/(x-x); */
+                    return (float)__kernel_standard((double)x,(double)x,108);
+                else
+                    /* d = zero/(x-x); */
+                    return (float)__kernel_standard((double)x,(double)x,109);
+        }
+       if(x>(float)X_TLOSS) {
+               /* y0(x>X_TLOSS) */
+               return (float)__kernel_standard((double)x,(double)x,135);
+       } else
+           return z;
+#endif
+}
diff --git a/sysdeps/generic/w_j0l.c b/sysdeps/generic/w_j0l.c
new file mode 100644 (file)
index 0000000..b74d9dd
--- /dev/null
@@ -0,0 +1,73 @@
+/* w_j0l.c -- long double version of w_j0.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 j0l(long double x), y0l(long double x)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       long double j0l(long double x)          /* wrapper j0l */
+#else
+       long double j0l(x)                              /* wrapper j0 */
+       long double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_j0l(x);
+#else
+       long double z = __ieee754_j0l(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
+       if(fabsl(x)>X_TLOSS) {
+               return __kernel_standard(x,x,234); /* j0(|x|>X_TLOSS) */
+       } else
+           return z;
+#endif
+}
+
+#ifdef __STDC__
+       long double y0l(long double x)          /* wrapper y0l */
+#else
+       long double y0l(x)                              /* wrapper y0 */
+       long double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_y0l(x);
+#else
+       long double z;
+       z = __ieee754_y0l(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,208);
+                else
+                    /* d = zero/(x-x); */
+                    return __kernel_standard(x,x,209);
+        }
+       if(x>X_TLOSS) {
+               return __kernel_standard(x,x,235); /* y0(x>X_TLOSS) */
+       } else
+           return z;
+#endif
+}
diff --git a/sysdeps/generic/w_j1.c b/sysdeps/generic/w_j1.c
new file mode 100644 (file)
index 0000000..39fe854
--- /dev/null
@@ -0,0 +1,77 @@
+/* @(#)w_j1.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * 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: w_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $";
+#endif
+
+/*
+ * wrapper of j1,y1
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       double j1(double x)             /* wrapper j1 */
+#else
+       double j1(x)                    /* wrapper j1 */
+       double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_j1(x);
+#else
+       double z;
+       z = __ieee754_j1(x);
+       if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
+       if(fabs(x)>X_TLOSS) {
+               return __kernel_standard(x,x,36); /* j1(|x|>X_TLOSS) */
+       } else
+           return z;
+#endif
+}
+#ifdef NO_LONG_DOUBLE
+strong_alias (j1, j1l)
+#endif
+
+
+#ifdef __STDC__
+       double y1(double x)             /* wrapper y1 */
+#else
+       double y1(x)                    /* wrapper y1 */
+       double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_y1(x);
+#else
+       double z;
+       z = __ieee754_y1(x);
+       if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
+        if(x <= 0.0){
+                if(x==0.0)
+                    /* d= -one/(x-x); */
+                    return __kernel_standard(x,x,10);
+                else
+                    /* d = zero/(x-x); */
+                    return __kernel_standard(x,x,11);
+        }
+       if(x>X_TLOSS) {
+               return __kernel_standard(x,x,37); /* y1(x>X_TLOSS) */
+       } else
+           return z;
+#endif
+}
+#ifdef NO_LONG_DOUBLE
+strong_alias (y1, y1l)
+#endif
diff --git a/sysdeps/generic/w_j1f.c b/sysdeps/generic/w_j1f.c
new file mode 100644 (file)
index 0000000..2a7c8db
--- /dev/null
@@ -0,0 +1,75 @@
+/* w_j1f.c -- float version of w_j1.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@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: w_j1f.c,v 1.3 1995/05/10 20:49:17 jtc Exp $";
+#endif
+
+/*
+ * wrapper of j1f,y1f
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       float j1f(float x)              /* wrapper j1f */
+#else
+       float j1f(x)                    /* wrapper j1f */
+       float x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_j1f(x);
+#else
+       float z;
+       z = __ieee754_j1f(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
+       if(fabsf(x)>(float)X_TLOSS) {
+               /* j1(|x|>X_TLOSS) */
+               return (float)__kernel_standard((double)x,(double)x,136);
+       } else
+           return z;
+#endif
+}
+
+#ifdef __STDC__
+       float y1f(float x)              /* wrapper y1f */
+#else
+       float y1f(x)                    /* wrapper y1f */
+       float x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_y1f(x);
+#else
+       float z;
+       z = __ieee754_y1f(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
+        if(x <= (float)0.0){
+                if(x==(float)0.0)
+                    /* d= -one/(x-x); */
+                    return (float)__kernel_standard((double)x,(double)x,110);
+                else
+                    /* d = zero/(x-x); */
+                    return (float)__kernel_standard((double)x,(double)x,111);
+        }
+       if(x>(float)X_TLOSS) {
+               /* y1(x>X_TLOSS) */
+               return (float)__kernel_standard((double)x,(double)x,137);
+       } else
+           return z;
+#endif
+}
diff --git a/sysdeps/generic/w_j1l.c b/sysdeps/generic/w_j1l.c
new file mode 100644 (file)
index 0000000..49a486c
--- /dev/null
@@ -0,0 +1,74 @@
+/* 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
+}
+
+#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
+}
diff --git a/sysdeps/generic/w_jn.c b/sysdeps/generic/w_jn.c
new file mode 100644 (file)
index 0000000..85fc383
--- /dev/null
@@ -0,0 +1,99 @@
+/* @(#)w_jn.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * 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: w_jn.c,v 1.6 1995/05/10 20:49:19 jtc Exp $";
+#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__
+       double jn(int n, double x)      /* wrapper jn */
+#else
+       double jn(n,x)                  /* wrapper jn */
+       double x; int n;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_jn(n,x);
+#else
+       double z;
+       z = __ieee754_jn(n,x);
+       if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
+       if(fabs(x)>X_TLOSS) {
+           return __kernel_standard((double)n,x,38); /* jn(|x|>X_TLOSS,n) */
+       } else
+           return z;
+#endif
+}
+#ifdef NO_LONG_DOUBLE
+strong_alias (jn, jnl)
+#endif
+
+
+#ifdef __STDC__
+       double yn(int n, double x)      /* wrapper yn */
+#else
+       double yn(n,x)                  /* wrapper yn */
+       double x; int n;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_yn(n,x);
+#else
+       double z;
+       z = __ieee754_yn(n,x);
+       if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
+        if(x <= 0.0){
+                if(x==0.0)
+                    /* d= -one/(x-x); */
+                    return __kernel_standard((double)n,x,12);
+                else
+                    /* d = zero/(x-x); */
+                    return __kernel_standard((double)n,x,13);
+        }
+       if(x>X_TLOSS) {
+           return __kernel_standard((double)n,x,39); /* yn(x>X_TLOSS,n) */
+       } else
+           return z;
+#endif
+}
+#ifdef NO_LONG_DOUBLE
+strong_alias (yn, ynl)
+#endif
diff --git a/sysdeps/generic/w_jnf.c b/sysdeps/generic/w_jnf.c
new file mode 100644 (file)
index 0000000..63ad335
--- /dev/null
@@ -0,0 +1,71 @@
+/* w_jnf.c -- float version of w_jn.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@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: w_jnf.c,v 1.3 1995/05/10 20:49:21 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       float jnf(int n, float x)       /* wrapper jnf */
+#else
+       float jnf(n,x)                  /* wrapper jnf */
+       float x; int n;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_jnf(n,x);
+#else
+       float z;
+       z = __ieee754_jnf(n,x);
+       if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
+       if(fabsf(x)>(float)X_TLOSS) {
+           /* jn(|x|>X_TLOSS,n) */
+           return (float)__kernel_standard((double)n,(double)x,138);
+       } else
+           return z;
+#endif
+}
+
+#ifdef __STDC__
+       float ynf(int n, float x)       /* wrapper ynf */
+#else
+       float ynf(n,x)                  /* wrapper ynf */
+       float x; int n;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_ynf(n,x);
+#else
+       float z;
+       z = __ieee754_ynf(n,x);
+       if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
+        if(x <= (float)0.0){
+                if(x==(float)0.0)
+                    /* d= -one/(x-x); */
+                    return (float)__kernel_standard((double)n,(double)x,112);
+                else
+                    /* d = zero/(x-x); */
+                    return (float)__kernel_standard((double)n,(double)x,113);
+        }
+       if(x>(float)X_TLOSS) {
+           /* yn(x>X_TLOSS,n) */
+           return (float)__kernel_standard((double)n,(double)x,139);
+       } else
+           return z;
+#endif
+}
diff --git a/sysdeps/generic/w_jnl.c b/sysdeps/generic/w_jnl.c
new file mode 100644 (file)
index 0000000..866e3cd
--- /dev/null
@@ -0,0 +1,96 @@
+/* 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
+}
+
+#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
+}
diff --git a/sysdeps/generic/w_lgamma.c b/sysdeps/generic/w_lgamma.c
new file mode 100644 (file)
index 0000000..4815db6
--- /dev/null
@@ -0,0 +1,60 @@
+/* @(#)w_lgamma.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * 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: w_lgamma.c,v 1.6 1995/05/10 20:49:24 jtc Exp $";
+#endif
+
+/* double lgamma(double x)
+ * Return the logarithm of the Gamma function of x.
+ *
+ * Method: call __ieee754_lgamma_r
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       double __lgamma(double x)
+#else
+       double __lgamma(x)
+       double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_lgamma_r(x,&signgam);
+#else
+        double y;
+       int local_signgam;
+        y = __ieee754_lgamma_r(x,&local_signgam);
+       if (_LIB_VERSION != _ISOC_)
+         /* ISO C99 does not define the global variable.  */
+         signgam = local_signgam;
+        if(_LIB_VERSION == _IEEE_) return y;
+        if(!__finite(y)&&__finite(x)) {
+            if(__floor(x)==x&&x<=0.0)
+                return __kernel_standard(x,x,15); /* lgamma pole */
+            else
+                return __kernel_standard(x,x,14); /* lgamma overflow */
+        } else
+            return y;
+#endif
+}
+weak_alias (__lgamma, lgamma)
+strong_alias (__lgamma, __gamma)
+weak_alias (__gamma, gamma)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__lgamma, __lgammal)
+weak_alias (__lgamma, lgammal)
+strong_alias (__gamma, __gammal)
+weak_alias (__gamma, gammal)
+#endif
diff --git a/sysdeps/generic/w_lgammaf.c b/sysdeps/generic/w_lgammaf.c
new file mode 100644 (file)
index 0000000..a50525a
--- /dev/null
@@ -0,0 +1,53 @@
+/* w_lgammaf.c -- float version of w_lgamma.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@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: w_lgammaf.c,v 1.3 1995/05/10 20:49:30 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       float __lgammaf(float x)
+#else
+       float __lgammaf(x)
+       float x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_lgammaf_r(x,&signgam);
+#else
+        float y;
+       int local_signgam;
+        y = __ieee754_lgammaf_r(x,&local_signgam);
+       if (_LIB_VERSION != _ISOC_)
+         /* ISO C99 does not define the global variable.  */
+         signgam = local_signgam;
+        if(_LIB_VERSION == _IEEE_) return y;
+        if(!__finitef(y)&&__finitef(x)) {
+            if(__floorf(x)==x&&x<=(float)0.0)
+               /* lgamma pole */
+                return (float)__kernel_standard((double)x,(double)x,115);
+            else
+               /* lgamma overflow */
+                return (float)__kernel_standard((double)x,(double)x,114);
+        } else
+            return y;
+#endif
+}
+weak_alias (__lgammaf, lgammaf)
+strong_alias (__lgammaf, __gammaf)
+weak_alias (__gammaf, gammaf)
diff --git a/sysdeps/generic/w_lgammaf_r.c b/sysdeps/generic/w_lgammaf_r.c
new file mode 100644 (file)
index 0000000..66962ac
--- /dev/null
@@ -0,0 +1,52 @@
+/* w_lgammaf_r.c -- float version of w_lgamma_r.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@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: w_lgammaf_r.c,v 1.3 1995/05/10 20:49:32 jtc Exp $";
+#endif
+
+/* 
+ * wrapper float lgammaf_r(float x, int *signgamp)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+
+#ifdef __STDC__
+       float __lgammaf_r(float x, int *signgamp) /* wrapper lgammaf_r */
+#else
+       float __lgammaf_r(x,signgamp)              /* wrapper lgammaf_r */
+        float x; int *signgamp;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_lgammaf_r(x,signgamp);
+#else
+        float y;
+        y = __ieee754_lgammaf_r(x,signgamp);
+        if(_LIB_VERSION == _IEEE_) return y;
+        if(!__finitef(y)&&__finitef(x)) {
+            if(__floorf(x)==x&&x<=(float)0.0)
+               /* lgamma pole */
+                return (float)__kernel_standard((double)x,(double)x,115);
+            else
+               /* lgamma overflow */
+               return (float)__kernel_standard((double)x,(double)x,114);
+        } else
+            return y;
+#endif
+}             
+weak_alias (__lgammaf_r, lgammaf_r)
diff --git a/sysdeps/generic/w_lgammal.c b/sysdeps/generic/w_lgammal.c
new file mode 100644 (file)
index 0000000..328c94e
--- /dev/null
@@ -0,0 +1,58 @@
+/* w_lgammal.c -- long double version of w_lgamma.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
+
+/* long double lgammal(long double x)
+ * Return the logarithm of the Gamma function of x.
+ *
+ * Method: call __ieee754_lgammal_r
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+       long double __lgammal(long double x)
+#else
+       long double __lgammal(x)
+       long double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_lgammal_r(x,&signgam);
+#else
+        long double y;
+       int local_signgam;
+        y = __ieee754_lgammal_r(x,&local_signgam);
+       if (_LIB_VERSION != _ISOC_)
+         /* ISO C99 does not define the global variable.  */
+         signgam = local_signgam;
+        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, lgammal)
+strong_alias (__lgammal, __gammal)
+weak_alias (__gammal, gammal)
diff --git a/sysdeps/generic/w_lgammal_r.c b/sysdeps/generic/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)
diff --git a/sysdeps/generic/w_log10.c b/sysdeps/generic/w_log10.c
new file mode 100644 (file)
index 0000000..8a0a70b
--- /dev/null
@@ -0,0 +1,51 @@
+/* @(#)w_log10.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * 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: w_log10.c,v 1.6 1995/05/10 20:49:35 jtc Exp $";
+#endif
+
+/*
+ * wrapper log10(X)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+
+#ifdef __STDC__
+       double __log10(double x)                /* wrapper log10 */
+#else
+       double __log10(x)                       /* wrapper log10 */
+       double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_log10(x);
+#else
+       double z;
+       z = __ieee754_log10(x);
+       if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
+       if(x<=0.0) {
+           if(x==0.0)
+               return __kernel_standard(x,x,18); /* log10(0) */
+           else
+               return __kernel_standard(x,x,19); /* log10(x<0) */
+       } else
+           return z;
+#endif
+}
+weak_alias (__log10, log10)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__log10, __log10l)
+weak_alias (__log10, log10l)
+#endif
diff --git a/sysdeps/generic/w_log10f.c b/sysdeps/generic/w_log10f.c
new file mode 100644 (file)
index 0000000..f90cb0c
--- /dev/null
@@ -0,0 +1,52 @@
+/* w_log10f.c -- float version of w_log10.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@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: w_log10f.c,v 1.3 1995/05/10 20:49:37 jtc Exp $";
+#endif
+
+/* 
+ * wrapper log10f(X)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+
+#ifdef __STDC__
+       float __log10f(float x)         /* wrapper log10f */
+#else
+       float __log10f(x)                       /* wrapper log10f */
+       float x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_log10f(x);
+#else
+       float z;
+       z = __ieee754_log10f(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
+       if(x<=(float)0.0) {
+           if(x==(float)0.0)
+               /* log10(0) */
+               return (float)__kernel_standard((double)x,(double)x,118);
+           else 
+               /* log10(x<0) */
+               return (float)__kernel_standard((double)x,(double)x,119);
+       } else
+           return z;
+#endif
+}
+weak_alias (__log10f, log10f)
diff --git a/sysdeps/generic/w_log10l.c b/sysdeps/generic/w_log10l.c
new file mode 100644 (file)
index 0000000..0d08616
--- /dev/null
@@ -0,0 +1,51 @@
+/* w_log10l.c -- long double version of w_log10.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 log10l(X)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+
+#ifdef __STDC__
+       long double __log10l(long double x)     /* wrapper log10l */
+#else
+       long double __log10l(x)                 /* wrapper log10l */
+       long double x;
+#endif
+{
+#ifdef _IEEE_LIBM
+       return __ieee754_log10l(x);
+#else
+       long double z;
+       z = __ieee754_log10l(x);
+       if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
+       if(x<=0.0) {
+           if(x==0.0)
+               return __kernel_standard(x,x,218); /* log10(0) */
+           else
+               return __kernel_standard(x,x,219); /* log10(x<0) */
+       } else
+           return z;
+#endif
+}
+weak_alias (__log10l, log10l)