Handbook
Glossary
period-length ( a/b -- n )
Vocabulary
project-euler
.
026
Inputs
a/b
an
object
Outputs
n
an
object
Definition
USING:
kernel
math
;
IN:
project-euler.026
:
period-length
( a/b -- n )
dup
recurring-period?
[
denominator
10
swap
mult-order
]
[
drop
0
]
if
;