Handbook
Glossary
log-factorial ( n -- value )
Vocabulary
picomath
Inputs
n
an
object
Outputs
value
an
object
Definition
USING:
combinators
kernel
locals.backend
math
math.constants
math.functions
picomath.private
sequences
;
IN:
picomath
:
log-factorial
( n -- value )
{
{
[
dup
0
<
]
[
"invalid input"
throw
]
}
{
[
dup
254
>
]
[
1
+
[
load-local
0
get-local
0.5
-
0
get-local
log
*
0
get-local
-
0.5 2
pi
*
log
*
+
1.0 12.0 0
get-local
*
/
+
1
drop-locals
]
call
]
}
[
lf
nth
]
}
cond
;