Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
41
Task/Gamma-function/Phixmonti/gamma-function.phixmonti
Normal file
41
Task/Gamma-function/Phixmonti/gamma-function.phixmonti
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
0.577215664901 var gamma
|
||||
-0.65587807152056 var coeff
|
||||
-0.042002635033944 var quad
|
||||
0.16653861138228 var qui
|
||||
-0.042197734555571 var theSet
|
||||
|
||||
def recigamma var z /# n -- n #/
|
||||
z 6 power theSet *
|
||||
z 5 power qui *
|
||||
z 4 power quad *
|
||||
z 3 power coeff *
|
||||
z 2 power gamma *
|
||||
z + + + + +
|
||||
enddef
|
||||
|
||||
/# without var
|
||||
def recigamma
|
||||
dup 6 power theSet * swap
|
||||
dup 5 power qui * swap
|
||||
dup 4 power quad * swap
|
||||
dup 3 power coeff * swap
|
||||
dup 2 power gamma * swap
|
||||
+ + + + +
|
||||
enddef
|
||||
#/
|
||||
|
||||
def gammafunc /# n -- n #/
|
||||
dup 1 == if
|
||||
else
|
||||
dup abs 0.5 <= if
|
||||
recigamma 1 swap /
|
||||
else
|
||||
dup 1 - gammafunc swap 1 - *
|
||||
endif
|
||||
endif
|
||||
enddef
|
||||
|
||||
0.1 2.1 .1 3 tolist
|
||||
for
|
||||
dup print " = " print gammafunc print nl
|
||||
endfor
|
||||
Loading…
Add table
Add a link
Reference in a new issue