summaryrefslogtreecommitdiff
path: root/libm/e_j1.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-28 22:15:07 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-28 22:15:07 +0000
commit30bd4a6cc3a093fdb32db26ee8bc30cd7ef47622 (patch)
tree01723c9bffa22959927c97216fa24ff1107bfd46 /libm/e_j1.c
parentde87f81d41ef95772db9e0616e6ae31f5894eda7 (diff)
remove many functions which just call __ieee754_<function>,
define them as aliases instead. text data bss dec hex filename - 45402 180 4 45586 b212 lib/libm-0.9.30-svn.so + 45302 180 4 45486 b1ae lib/libm-0.9.30-svn.so
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;