[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: motion for Sep 7: correct parameters for external decimal character sequences
Item 14. - Dan
Date: Mon, 28 Aug 2006 13:47:01 -0700
From: Jim Thomas <jwthomas@xxxxxxxxxx>
Subject: motion for Sep 7: correct parameters for external decimal character
sequences
Dan, I'd like to make the following motion at the September 7 meeting.
-Jim
-----------------
Motion: correct parameters for external decimal character sequences
Rationale: 7.12.3 in the current draft specifies two conversion
parameters m and n that determine the required precision and range for
external decimal character sequences for correct rounding to and from
internal formats. Parameter m is the precision necessary to distinguish
all representations in the widest supported format in a radix; its
specification is not at issue. Parameter n is intended to be a suitable
maximum exponent of 10 for the external decimal character sequences. As
Michel Hack pointed out in his email of 8/16/06, the formulas for n in
the current draft are incorrect, and devising a general formula for n
that works for all standard formats is problematic. Note that n needs
to depend on the formatting scheme (e.g. X.X...XeSYYY, 0.X...DeSYYY,
XX...XESYYY) as well as the choice of \mu, and that there is great
latitude in precision and range for standard extended formats.
On the other hand, determining the needed range of exponents for the
external decimal character sequences is straightforward once the
formatting scheme, \mu, and the internal format to be covered are
given. For example, say binary32 is the widest internal format, \mu =
12, and the formatting scheme is X.XX...XeSYYY. The extreme values
(rounded to nearest, though that clearly doesn't matter in this case)
are
3.40282346639e+38
1.40129846432e-45
so the exponent range must be at least [-45, 38] which is covered by
[-99, 99]. What's important is that the external decimal character
sequence format be able to represent up to \mu significant digits and
have enough exponent range to represent the result of converting any
internal format value to external decimal character sequence with up to
\mu significant digits. (\mu is implementation defined and >= m+3.)
This proposal avoids attempting to formulate the parameter n and,
instead, specifies that the exponent range for the external decimal
character sequences must be sufficient for the purpose.
Text changes:
In 7.12.3, replace paragraph 1 with:
"The conversion parameter m is specified below according to the widest
internal format supported in a radix. For each supported radix, an
implementation shall define an integer \mu >= (m+3) and an integer \eta
and shall provide conversion between all interchange and non-interchange
formats in the radix and at least one external character sequence format
that represents all decimal numbers with up to \mu significant digits
and with exponents (of 10) in the range [-\eta, \eta]. \eta is further
specified below."
In Table 11, change "parameters" to "parameter"
In Table 11, delete the last column
[The numbers (99, 999, 9999) in the current last column wouldn't work
for all formatting schemes and all choice of \mu, e.g., 99 wouldn't
suffice for binary32 if the significant had to be an integer and \mu
were greater than 55.]
Below Table 11, under the bullets for extended formats, delete the lines
formulating n
After the bullets (below Table 11), add the paragraph:
"\eta shall be sufficiently large to represent the result of converting
any number in internal format to the external decimal character sequence
format with up to \mu significant digits."