Handbook
Glossary
format-decimal-simple ( x digits -- string )
Vocabulary
formatting
.
private
Inputs
x
an
object
digits
an
object
Outputs
string
an
object
Definition
USING:
kernel
math
math.functions
math.parser
sequences
;
IN:
formatting.private
:
format-decimal-simple
( x digits -- string )
[
[
abs
]
dip
[
10^
*
round-to-even
>integer
number>string
]
[
1
+
48
pad-head
]
[
cut*
]
tri
[
"."
glue
]
unless-empty
]
keepd
neg?
[
45
prefix
]
when
;