Handbook
Glossary
gamma ( x -- y )
Vocabulary
math
.
analysis
Inputs
x
a
number
Outputs
y
a
number
Word description
Gamma function; an extension of factorial to real and complex numbers.
Definition
USING:
combinators.short-circuit
kernel
math
math.analysis.private
;
IN:
math.analysis
:
gamma
( x -- y )
dup
{
[
0.0
<=
]
[
1.0
mod
zero?
]
}
1&&
[
drop
1/0.
]
[
[
abs
gamma-lanczos6
]
keep
dup
0
>
[
drop
]
[
gamma-neg
]
if
]
if
;