[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


What should this do:

(FORMAT () "~E" 3/4)

I have one implementation that produces "0.75" and another that produces
"7.5E-1".  As far as I can detect, the latter MAY be correct.  CLtL says, on
page 393 about the ~E directive, "If all of [the parameters] are omitted, then
the effect is to print the value using ordinary free-format
exponential-notation output; prin1 uses this format for any non-zero number
whose magnitude is less than 10^-3 or greater than or equal to 10^7.
     "If arg is a rational number, then it is coerced to be a single-float and
then printed."

	It is unclear whether: (a) the same format used by prin1 for numbers
in the given range should be used regardless of the range of the arg, or (b)
if it should print like prin1.

	It seems the former interpretation may be correct, as it clearly
states that the format used is used by prin1 "for any non-zero number whose
magnitude...", and it is the *format* we are talking about, not "what prin1"
does.  I would like clarification of this point.

Thanks in advance.