Handbook
Glossary
format-fast-decimal? ( x digits -- x' digits ? )
Vocabulary
formatting.private
Inputs
x
an
object
digits
an
object
Outputs
x'
an
object
digits
an
object
?
an
object
Definition
USING:
kernel
math
math.functions
;
IN:
formatting.private
:
format-fast-decimal?
( x digits -- x' digits ? )
over
float?
[
t
]
[
2dup
[
drop
dup
integer?
[
abs
53
2^
<
]
[
drop
f
]
if
]
[
over
ratio?
[
[
abs
integer-log10
]
dip
[
drop
abs
308
<
]
[
+
15
<=
]
2bi
and
]
[
2drop
f
]
if
]
2bi
or
[
[
[
>float
]
dip
]
when
]
keep
]
if
;
inline