Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
factor-2s ( n -- r s )
Vocabulary
math.functions
Definition
USING:
kernel
math
;
IN:
math.functions
:
factor-2s
( n -- r s )
dup
0
=
[
1
]
[
[
0
]
dip
[
dup
even?
]
[
[
1
+
]
[
2/
]
bi*
]
while
]
if
;
inline