Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Gamma-function/TXR/gamma-function-1.txr
Normal file
20
Task/Gamma-function/TXR/gamma-function-1.txr
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
(defun gamma (x)
|
||||
(/ (rpoly (- x 1.0)
|
||||
#( 1.00000,00000,00000,00000 0.57721,56649,01532,86061
|
||||
-0.65587,80715,20253,88108 -0.04200,26350,34095,23553
|
||||
0.16653,86113,82291,48950 -0.04219,77345,55544,33675
|
||||
-0.00962,19715,27876,97356 0.00721,89432,46663,09954
|
||||
-0.00116,51675,91859,06511 -0.00021,52416,74114,95097
|
||||
0.00012,80502,82388,11619 -0.00002,01348,54780,78824
|
||||
-0.00000,12504,93482,14267 0.00000,11330,27231,98170
|
||||
-0.00000,02056,33841,69776 0.00000,00061,16095,10448
|
||||
0.00000,00050,02007,64447 -0.00000,00011,81274,57049
|
||||
0.00000,00001,04342,67117 0.00000,00000,07782,26344
|
||||
-0.00000,00000,03696,80562 0.00000,00000,00510,03703
|
||||
-0.00000,00000,00020,58326 -0.00000,00000,00005,34812
|
||||
0.00000,00000,00001,22678 -0.00000,00000,00000,11813
|
||||
0.00000,00000,00000,00119 0.00000,00000,00000,00141
|
||||
-0.00000,00000,00000,00023 0.00000,00000,00000,00002))))
|
||||
|
||||
(each ((i 1..11))
|
||||
(put-line (pic "##.######" (gamma (/ i 3.0)))))
|
||||
7
Task/Gamma-function/TXR/gamma-function-2.txr
Normal file
7
Task/Gamma-function/TXR/gamma-function-2.txr
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(defun gamma (x)
|
||||
(* (sqrt (/ (* 2 %pi%)
|
||||
x))
|
||||
(expt (/ x %e%) x)))
|
||||
|
||||
(each ((i 1..11))
|
||||
(put-line (pic "##.######" (gamma (/ i 3.0)))))
|
||||
12
Task/Gamma-function/TXR/gamma-function-3.txr
Normal file
12
Task/Gamma-function/TXR/gamma-function-3.txr
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
(defun gamma (x)
|
||||
(let* ((cof #(76.18009172947146 -86.50532032941677
|
||||
24.01409824083091 -1.231739572450155
|
||||
0.001208650973866179 -0.000005395239384953))
|
||||
(ser0 1.000000000190015)
|
||||
(x55 (+ x 5.5))
|
||||
(tmp (- x55 (* (+ x 0.5) (log x55))))
|
||||
(ser (+ ser0 (sum [mapcar / cof (succ x)]))))
|
||||
(exp (- (log (/ (* 2.5066282746310005 ser) x)) tmp))))
|
||||
|
||||
(each ((i (rlist 0.1..1.0..0.1 2..10)))
|
||||
(put-line (pic "##.# ######.######" i (gamma i))))
|
||||
20
Task/Gamma-function/TXR/gamma-function-4.txr
Normal file
20
Task/Gamma-function/TXR/gamma-function-4.txr
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
(defun gamma (x)
|
||||
(if (< x 0.5)
|
||||
(/ %pi%
|
||||
(* (sin (* %pi% x))
|
||||
(gamma (- 1 x))))
|
||||
(let* ((cof #(676.5203681218851 -1259.1392167224028
|
||||
771.32342877765313 -176.61502916214059
|
||||
12.507343278686905 -0.13857109526572012
|
||||
9.9843695780195716e-6 1.5056327351493116e-7))
|
||||
(ser0 0.99999999999980993)
|
||||
(z (pred x))
|
||||
(tmp (+ z (len cof) -0.5))
|
||||
(ser (+ ser0 (sum [mapcar / cof (succ z)]))))
|
||||
(* (sqrt (* 2 %pi%))
|
||||
(expt tmp (+ z 0.5))
|
||||
(exp (- tmp))
|
||||
ser))))
|
||||
|
||||
(each ((i (rlist 0.1..1.0..0.1 2..10)))
|
||||
(put-line (pic "##.# ######.######" i (gamma i))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue