Handbook
Glossary
decimal-format ( neg? f-str f-len e -- sbuf )
Vocabulary
math
.
parser
.
private
Inputs
neg?
an
object
f-str
an
object
f-len
an
object
e
an
object
Outputs
sbuf
an
object
Definition
USING:
combinators
kernel
math
sbufs
sequences
strings
;
IN:
math.parser.private
:
decimal-format
( neg? f-str f-len e -- sbuf )
[
19
<sbuf>
]
4dip
{
{
[
dup
0
>=
]
[
nip
0
swap
1
]
}
{
[
2dup
neg
<=
]
[
over
+
neg
1
swap
]
}
[
nip
neg
0 0
]
}
cond
[
cut-slice*
]
2dip
rot
{
[
?minus
]
[
append!
]
[
48
<string>
append!
46
suffix!
]
[
48
<string>
append!
]
[
append!
]
}
spread
;
inline