diff options
| author | wukong <wukong@longaeva> | 2018-06-13 21:41:39 -0700 |
|---|---|---|
| committer | wukong <wukong@longaeva> | 2018-06-13 21:41:39 -0700 |
| commit | 8875b420a873a360a9484778b487394add318a5e (patch) | |
| tree | d357816354c5d9d4bc3b1db5c43ceda7933b5e3f /sterling_approx.txt | |
| parent | 6bb6be845b6099550e0a530217633e30522093ad (diff) | |
added shebang, replaced if-elses with shortcut notation, ported online mean and variance calc to mean.awk
Diffstat (limited to 'sterling_approx.txt')
| -rw-r--r-- | sterling_approx.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sterling_approx.txt b/sterling_approx.txt new file mode 100644 index 0000000..5cb3f6e --- /dev/null +++ b/sterling_approx.txt @@ -0,0 +1,10 @@ + +# https://en.wikipedia.org/wiki/Sterling_Approximation +# An alternative approximation for the Gamma function stated by Srinivasa +# Ramanujan (Ramanujan 1988) is + + Gamma(1+x) ~= sqrt(pi)((x/e)^x)(8x^3 + 4x^2 + x + 1/30)^(1/6) + +# for x >= 0. The equivalent approximation for ln(n!) has an asymptotic error +# of 1/(1400*n^3) ... + |
