Handbook
Glossary
denominator ( a/b -- b )
Factor handbook
»
The language
»
Numbers
»
Rational numbers
Prev:
numerator ( a/b -- a )
Next:
>fraction ( a/b -- a b )
Vocabulary
math
Inputs
a/b
a
rational
Outputs
b
a positive integer
Word description
Outputs the denominator of a rational number. Always outputs 1 with integers.
Definition
IN:
math
GENERIC:
denominator
( a/b -- b )
Methods
USING:
kernel
math
;
M:
integer
denominator
drop
1
;
inline
USING:
accessors
math
;
M:
ratio
denominator
denominator>>
;
inline