use math/floatingpoint
gamma
( n
→ Γ(n)
)This is the gamma function
or at least an approximation to it. For positive integer n
, this is simply (n
-1)!.
It uses regular Javascript numbers to be able to support non-integer values, so after 200
it overflows and returns Infinity
.
For a true factorial function, you can do this:
to ! do 1n swap times do i big 1+ * end end
loggamma
( n
→ ln(Γ(n))
)Natural logarithm of the gamma function.
See Also: gamma
lambertW
( n
→ W(n)
)erf
( x
→ erf(x)
)The Gauss error function.
erfc
( x
→ erfc(x)
)The complimentary error function, equal to 1-erf(x
).
See Also: erf
besselJ
( n
x
→ J_n(x)
)The Bessel function of the first kind.
minkowski?
( x
→ ?(x)
)The Minkowski question mark function.
docs@04547c7