Handbook
Glossary
2>fraction ( a/b c/d -- a c b d )
Vocabulary
math
.
ratios
Inputs
a/b
a
rational
c/d
a
rational
Outputs
a
an
integer
c
an
integer
b
a positive integer
d
a positive integer
Word description
Extracts the numerator and denominator of two rational numbers at once.
Definition
USING:
kernel
math
;
IN:
math.ratios
:
2>fraction
( a/b c/d -- a c b d )
[
>fraction
]
bi@
swapd
;
inline