Talk:Welch's t-test: Difference between revisions

→‎Existing Perl doesn't work: We can make it work. We are Perl. Our modules are legion.
(→‎Existing Perl doesn't work: We can make it work. We are Perl. Our modules are legion.)
Line 713:
I think this should replace the current perl code (because frankly, I can't get all the modules surrounding the current one to work). I realize that Macs don't have POSIX, so I replaced the 'lgamma' with something more portable. It should work anywhere with Perl 5.0 and up.
Let me know what you think.--[[User:Hailholyghost|Hailholyghost]] ([[User talk:Hailholyghost|talk]]) 01:49, 5 January 2018 (UTC)
 
: I like the existing code. Try the following simple changes to the current code:
<pre>
3c3
< use Math::AnyNum qw(gamma pi);
---
> use Math::Cephes qw(gamma $PI);
38c38
< (gamma($sa + 1) * sqrt(pi) / gamma($sa + 1.5)))->numify;
---
> (gamma($sa + 1) * sqrt($PI) / gamma($sa + 1.5)));
</pre>
It gives similar results and the dependency chain should be much easier. There are a lot of machines that don't have MPFR installed, and some that don't even have GMP. The downside is that Math::AnyNum is a much more functional module that builds on others. But Math::Cephes is pretty cool as a standalone native precision library. I've thought about adding gamma to the ntheory module but it's complicated (for me at least). [[User:Danaj|Danaj]] ([[User talk:Danaj|talk]]) 22:31, 5 January 2018 (UTC)
 
== New title ==
Anonymous user