summaryrefslogtreecommitdiff
path: root/libm/e_j0.c
diff options
context:
space:
mode:
Diffstat (limited to 'libm/e_j0.c')
-rw-r--r--libm/e_j0.c45
1 files changed, 43 insertions, 2 deletions
diff --git a/libm/e_j0.c b/libm/e_j0.c
index 0c34ceb91..ea37460c0 100644
--- a/libm/e_j0.c
+++ b/libm/e_j0.c
@@ -123,6 +123,23 @@ double attribute_hidden __ieee754_j0(double x)
}
}
+/*
+ * wrapper j0(double x)
+ */
+#ifndef _IEEE_LIBM
+double j0(double x)
+{
+ 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) */
+ return z;
+}
+#else
+strong_alias(__ieee754_j0, j0)
+#endif
+
static const double
u00 = -7.38042951086872317523e-02, /* 0xBFB2E4D6, 0x99CBD01F */
u01 = 1.76666452509181115538e-01, /* 0x3FC69D01, 0x9DE9E3FC */
@@ -188,6 +205,30 @@ double attribute_hidden __ieee754_y0(double x)
return(u/v + tpi*(__ieee754_j0(x)*__ieee754_log(x)));
}
+/*
+ * wrapper y0(double x)
+ */
+#ifndef _IEEE_LIBM
+double y0(double x)
+{
+ double 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);
+ /* d = zero/(x-x); */
+ return __kernel_standard(x, x, 9);
+ }
+ if (x > X_TLOSS)
+ return __kernel_standard(x, x, 35); /* y0(x>X_TLOSS) */
+ return z;
+}
+#else
+strong_alias(__ieee754_y0, y0)
+#endif
+
+
/* The asymptotic expansions of pzero is
* 1 - 9/128 s^2 + 11025/98304 s^4 - ..., where s = 1/x.
* For x >= 2, We approximate pzero by
@@ -261,7 +302,7 @@ static const double pS2[5] = {
1.46576176948256193810e+01, /* 0x402D50B3, 0x44391809 */
};
- static double pzero(double x)
+static double pzero(double x)
{
const double *p = 0,*q = 0;
double z,r,s;
@@ -356,7 +397,7 @@ static const double qS2[6] = {
-5.31095493882666946917e+00, /* 0xC0153E6A, 0xF8B32931 */
};
- static double qzero(double x)
+static double qzero(double x)
{
const double *p=0,*q=0;
double s,r,z;