Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Gamma-function/Wren/gamma-function.wren
Normal file
12
Task/Gamma-function/Wren/gamma-function.wren
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import "/fmt" for Fmt
|
||||
import "/math" for Math
|
||||
|
||||
var stirling = Fn.new { |x| (2 * Num.pi / x).sqrt * (x / Math.e).pow(x) }
|
||||
|
||||
System.print(" x\tStirling\t\tLanczos\n")
|
||||
for (i in 1..20) {
|
||||
var d = i / 10
|
||||
System.write("%(Fmt.f(4, d, 2))\t")
|
||||
System.write("%(Fmt.f(16, stirling.call(d), 14))\t")
|
||||
System.print("%(Fmt.f(16, Math.gamma(d), 14))")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue