Handbook
Glossary
>float ( x -- y )
Factor handbook
»
The language
»
Numbers
»
Floats
Prev:
float
Next:
/f ( x y -- z )
Vocabulary
math
Inputs
x
a
real
Outputs
y
a
float
Word description
Converts a real to a float. This is the identity on floats, and performs a floating point division on rationals.
Definition
IN:
math
GENERIC:
>float
( x -- y )
foldable
flushable
Methods
USING:
math
math.integers.private
;
M:
bignum
>float
bignum>float
;
inline
USING:
math
math.private
;
M:
fixnum
>float
fixnum>float
;
inline
USING:
math
;
M:
float
>float
;
inline
USING:
math
;
M:
ratio
>float
>fraction
/f
;