summaryrefslogtreecommitdiff
path: root/libm/e_lgamma_r.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-28 22:15:07 (GMT)
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-28 22:15:07 (GMT)
commit30bd4a6cc3a093fdb32db26ee8bc30cd7ef47622 (patch)
tree01723c9bffa22959927c97216fa24ff1107bfd46 /libm/e_lgamma_r.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_lgamma_r.c')
-rw-r--r--libm/e_lgamma_r.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/libm/e_lgamma_r.c b/libm/e_lgamma_r.c
index b578a2c..5aacadc 100644
--- a/libm/e_lgamma_r.c
+++ b/libm/e_lgamma_r.c
@@ -291,3 +291,46 @@ double attribute_hidden __ieee754_lgamma_r(double x, int *signgamp)
if(hx<0) r = nadj - r;
return r;
}
+
+/*
+ * wrapper double lgamma_r(double x, int *signgamp)
+ */
+#ifndef _IEEE_LIBM
+double lgamma_r(double x, int *signgamp)
+{
+ double y = __ieee754_lgamma_r(x, signgamp);
+ if (_LIB_VERSION == _IEEE_)
+ return y;
+ if (!isfinite(y) && isfinite(x)) {
+ if (floor(x) == x && x <= 0.0)
+ return __kernel_standard(x, x, 15); /* lgamma pole */
+ return __kernel_standard(x, x, 14); /* lgamma overflow */
+ }
+ return y;
+}
+#else
+strong_alias(__ieee754_lgamma_r, lgamma_r)
+#endif
+
+/*
+ * wrapper double gamma_r(double x, int *signgamp)
+ */
+double gamma_r(double x, int *signgamp);
+libm_hidden_proto(gamma_r)
+#ifndef _IEEE_LIBM
+double gamma_r(double x, int *signgamp)
+{
+ double y = __ieee754_lgamma_r(x, signgamp);
+ if (_LIB_VERSION == _IEEE_)
+ return y;
+ if (!isfinite(y) && isfinite(x)) {
+ if (floor(x) == x && x <= 0.0)
+ return __kernel_standard(x, x, 41); /* gamma pole */
+ return __kernel_standard(x, x, 40); /* gamma overflow */
+ }
+ return y;
+}
+#else
+strong_alias(__ieee754_lgamma_r, gamma_r)
+#endif
+libm_hidden_def(gamma_r)