- 19 Nov 2016 01:46:09 pm
- Last edited by mr womp womp on 11 Dec 2016 07:37:26 pm; edited 2 times in total
11 years ago, thornahawk μολών λαβέ posted this gamma function routine.
As you may know, the gamma function can be used to compute the Beta function using this form: . Therefore, you can modify the gamma function routine to compute like this:
Code:
As you may know, the gamma function can be used to compute the Beta function using this form: . Therefore, you can modify the gamma function routine to compute like this:
Code:
{P,Q,P+Q→L2
For(D,1,3
L2(D→A
A→Z
If 0>real(A
1-Z→Z
e^((Z-.5)ln(Z+8.5)-Z-8.5+ln(√(2π)(1+sum({5716.4001882743,-14815.304267684,14291.492776575,-6348.1602176415,1301.6082860583,-108.17670535144,2.6056965056118,-0.0074234525,5.384136 × 10^-8,-4.02353 × 10^-9}/(Z-1+cumSum(binomcdf(9,0
If 0>real(A
2πi/Ans/(2isin(πA
augment(L2,{Ans→L2
End
round(Ans(4)Ans(5)/Ans(6),8