Handbook
Glossary
>ratio ( seq -- a/b )
Vocabulary
math
.
continued-fractions
Inputs
seq
a sequence representing a continued fraction
Outputs
a/b
a fractional number
Word description
Transform
seq
into its rational representation.
Definition
USING:
kernel
math
math.continued-fractions.private
sequences
;
IN:
math.continued-fractions
:
>ratio
( seq -- a/b )
closest
reverse!
unclip-slice
[
swap
recip
+
]
reduce
;