Handbook
Glossary
format-scientific-simple ( x digits -- string )
Vocabulary
formatting
.
private
Inputs
x
an
object
digits
an
object
Outputs
string
an
object
Definition
USING:
kernel
math
math.functions
sequences
;
IN:
formatting.private
:
format-scientific-simple
( x digits -- string )
[
[
abs
dup
integer-log10
]
dip
[
format-scientific-mantissa
]
[
drop
nip
format-scientific-exponent
]
3bi
append
]
keepd
neg?
[
45
prefix
]
when
;