→ string ; scale ; sign
Decodes the floating point number float to a decimal representation. The string string is a sequence of significant digits with no leading or trailing zero.
The scale exponent scale returned indicates the relative position of the decimal dot with respect to the string returned. It may be outside the string. The values returned could be interpreted as a real by
(expt 10 (-
In case the floating pointer number is zero, the string is the
"" and scale is zero.
If float is negative then the returned sign is less than zero, and greater than zero otherwise.
When nsig is
nil (the default) as many digits are produced as
necessary. When nsig is given it is the maximum number of
significant digits and hence the maximum length of the string
returned. nsig must be either
nil or a positive integer.
(decimal-decode-float -12.34) ⇒
(decimal-decode-float 1d-8) ⇒
(decimal-decode-float 6774.0 2) ⇒
(decimal-decode-float 9.999 2) ⇒
This description is wrong as nsig rather is about rounding and nsig=0 also is a valid argument.