Handbook
Glossary
gamma ( x -- value )
Vocabulary
picomath
Inputs
x
an
object
Outputs
value
an
object
Definition
USING:
combinators
kernel
math
math.functions
picomath.private
;
IN:
picomath
::
gamma
( x -- value )
x 0
<=
[
"Invalid input"
throw
]
when
x
{
{
[
dup
0.001
<
]
[
GAMMA
*
1.0
+
x
*
recip
]
}
{
[
dup
12.0
<
]
[
(gamma)
]
}
{
[
dup
171.624
>
]
[
drop
1/0.
]
}
[
log-gamma
e^
]
}
cond
;