Handbook
Glossary
>fraction ( a/b -- a b )
Factor handbook
»
The language
»
Numbers
»
Rational numbers
Prev:
denominator ( a/b -- b )
Vocabulary
math
Inputs
a/b
a
rational
Outputs
a
an
integer
b
a positive integer
Word description
Extracts the numerator and denominator of a rational number.
Definition
IN:
math
GENERIC:
>fraction
( a/b -- a b )
Methods
USING:
math
;
M:
integer
>fraction
1
;
inline
USING:
kernel
math
;
M:
ratio
>fraction
[
numerator
]
[
denominator
]
bi
;
inline