Handbook
Glossary
pow-until ( base x -- base^x )
Vocabulary
math
.
parser
.
private
Inputs
base
an
object
x
an
object
Outputs
base^x
an
object
Definition
USING:
kernel
math
;
IN:
math.parser.private
:
pow-until
( base x -- base^x )
[
1
]
2dip
[
dup
odd?
[
[
[
*
]
keep
]
[
1
-
]
bi*
]
when
[
sq
]
[
2/
]
bi*
]
until-zero
drop
;
inline