Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
18
Task/Gamma-function/AWK/gamma-function.awk
Normal file
18
Task/Gamma-function/AWK/gamma-function.awk
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# syntax: GAWK -f GAMMA_FUNCTION.AWK
|
||||
BEGIN {
|
||||
e = (1+1/100000)^100000
|
||||
pi = atan2(0,-1)
|
||||
|
||||
print("X Stirling")
|
||||
for (i=1; i<=20; i++) {
|
||||
d = i / 10
|
||||
printf("%4.2f %9.5f\n",d,gamma_stirling(d))
|
||||
}
|
||||
exit(0)
|
||||
}
|
||||
function gamma_stirling(x) {
|
||||
return sqrt(2*pi/x) * pow(x/e,x)
|
||||
}
|
||||
function pow(a,b) {
|
||||
return exp(b*log(a))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue