From 14373fc4db7440d39db4fd39297f2ed44cc990f2 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 7 Feb 2008 01:43:43 +0000 Subject: * math.c (math_gamma): new method Math.gamma. (math_lgamma): new method Math.lgamma. * include/ruby/missing.h (tgamma): declared unless HAVE_TGAMMA. (lgamma_r): declared unless HAVE_LGAMMA_R. * configure.in (tgamma): check for replacement funtions. (lgamma_r): ditto. * missing/tgamma.c: new file. based on gamma.c from "C-gengo niyoru saishin algorithm jiten" (New Algorithm handbook in C language) (Gijyutsu hyouron sha, Tokyo, 1991) by Haruhiko Okumura. * missing/lgamma_r.c: ditto. * LEGAL (missing/tgamma.c): describe as public domain. (missing/lgamma_r.c): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/missing.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/ruby/missing.h') diff --git a/include/ruby/missing.h b/include/ruby/missing.h index da38a3ef5d..cfa430d5d5 100644 --- a/include/ruby/missing.h +++ b/include/ruby/missing.h @@ -79,6 +79,14 @@ extern double erf(double); extern double erfc(double); #endif +#ifndef HAVE_TGAMMA +extern double tgamma(double); +#endif + +#ifndef HAVE_LGAMMA_R +extern double lgamma_r(double, int *); +#endif + #ifndef isinf # ifndef HAVE_ISINF # if defined(HAVE_FINITE) && defined(HAVE_ISNAN) -- cgit v1.2.3