summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-12 16:12:46 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-12 16:12:46 (GMT)
commit126aba858724e935f4d1fd735621f997575eb871 (patch)
tree9651cc4e0c45d2e48220c60342c4443b4c3349d0 /math.c
parentac6e069aef98e8e94617b964284cb682126d8727 (diff)
fix tgamma for inifity
* configure.in: do not use buggy tgamma() of mingw. * missing/tgamma.c (tgamma): merge fix for inifity from ruby_tgamma. since msvcr120.dll and later have tgamma, this implementation will not be used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'math.c')
-rw-r--r--math.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/math.c b/math.c
index 245cdcf..570776b 100644
--- a/math.c
+++ b/math.c
@@ -778,22 +778,6 @@ math_erfc(VALUE unused_obj, VALUE x)
return DBL2NUM(erfc(Get_Double(x)));
}
-#if defined _WIN32
-static inline double
-ruby_tgamma(const double d)
-{
- const double g = tgamma(d);
- if (isinf(g)) {
- if (d == 0.0 && signbit(d)) return -INFINITY;
- }
- if (isnan(g)) {
- if (!signbit(d)) return INFINITY;
- }
- return g;
-}
-#define tgamma(d) ruby_tgamma(d)
-#endif
-
#if defined LGAMMA_R_PM0_FIX
static inline double
ruby_lgamma_r(const double d, int *sign)