summaryrefslogtreecommitdiff
path: root/libm/e_j1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libm/e_j1.c')
-rw-r--r--libm/e_j1.c44
1 files changed, 42 insertions, 2 deletions
diff --git a/libm/e_j1.c b/libm/e_j1.c
index 92e15ce75..1f674e9cf 100644
--- a/libm/e_j1.c
+++ b/libm/e_j1.c
@@ -118,6 +118,23 @@ double attribute_hidden __ieee754_j1(double x)
return(x*0.5+r/s);
}
+/*
+ * wrapper of j1
+ */
+#ifndef _IEEE_LIBM
+double j1(double x)
+{
+ double 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) */
+ return z;
+}
+#else
+strong_alias(__ieee754_j1, j1)
+#endif
+
static const double U0[5] = {
-1.96057090646238940668e-01, /* 0xBFC91866, 0x143CBC8A */
5.04438716639811282616e-02, /* 0x3FA9D3C7, 0x76292CD1 */
@@ -181,6 +198,29 @@ double attribute_hidden __ieee754_y1(double x)
return(x*(u/v) + tpi*(__ieee754_j1(x)*__ieee754_log(x)-one/x));
}
+/*
+ * wrapper of y1
+ */
+#ifndef _IEEE_LIBM
+double y1(double x)
+{
+ double 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);
+ /* d = zero/(x-x); */
+ return __kernel_standard(x, x, 11);
+ }
+ if (x > X_TLOSS)
+ return __kernel_standard(x, x, 37); /* y1(x>X_TLOSS) */
+ return z;
+}
+#else
+strong_alias(__ieee754_y1, y1)
+#endif
+
/* For x >= 8, the asymptotic expansions of pone is
* 1 + 15/128 s^2 - 4725/2^15 s^4 - ..., where s = 1/x.
* We approximate pone by
@@ -255,7 +295,7 @@ static const double ps2[5] = {
8.36463893371618283368e+00, /* 0x4020BAB1, 0xF44E5192 */
};
- static double pone(double x)
+static double pone(double x)
{
const double *p=0,*q=0;
double z,r,s;
@@ -351,7 +391,7 @@ static const double qs2[6] = {
-4.95949898822628210127e+00, /* 0xC013D686, 0xE71BE86B */
};
- static double qone(double x)
+static double qone(double x)
{
const double *p=0,*q=0;
double s,r,z;