* missing/lgamma_r.c (lgamma_r): get rid of false warning on mingw.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d2dd7416fa
commit
bfb8b125fa
@ -47,6 +47,17 @@ loggamma(double x) /* the natural logarithm of the Gamma function. */
|
|||||||
+ 0.5 * LOG_2PI - log(v) - x + (x - 0.5) * log(x);
|
+ 0.5 * LOG_2PI - log(v) - x + (x - 0.5) * log(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __MINGW_ATTRIB_PURE
|
||||||
|
/* get rid of bugs in math.h of mingw */
|
||||||
|
#define modf(_X, _Y) __extension__ ({\
|
||||||
|
double intpart_modf_bug = intpart_modf_bug;\
|
||||||
|
double result_modf_bug = modf((_X), &intpart_modf_bug);\
|
||||||
|
*(_Y) = intpart_modf_bug;\
|
||||||
|
result_modf_bug;\
|
||||||
|
})
|
||||||
|
#endif
|
||||||
|
|
||||||
/* the natural logarithm of the absolute value of the Gamma function */
|
/* the natural logarithm of the absolute value of the Gamma function */
|
||||||
double
|
double
|
||||||
lgamma_r(double x, int *signp)
|
lgamma_r(double x, int *signp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user