Comment 3 for bug 876655

Revision history for this message
Alexander Klimov (alserkli) wrote :

Since <HyperSpec/Body/26_glo_s.htm> does not contain a definition of
"significant digit", I guess we can apply the usual definition applied
to exponential (aka. scientific) notation
<http://en.wikipedia.org/wiki/Significant_figures#Scientific_notation>:

  [I]n the normalized form of that notation, placeholder leading and
  trailing digits do not occur, so all digits are significant. For
  example, 0.00012 (two significant digits) becomes 1.2×10^−4, and
  0.00122300 (six significant digits) becomes 1.22300×10^−3. In
  particular, the potential ambiguity about the significance of
  trailing zeros is eliminated. For example, 1300 to four significant
  digits is written as 1.300×10^3, while 1300 to two significant digits
  is written as 1.3×10^3.

That is 10.0 has two significant digits before the point and one after
it.

Note that if "10.[...]" were understood to have 1 significant digit
because the trailing zeros are considered insignificant, then

 (format nil "~,3,,4e" 123) ; -> "1230.e-1"

would be an error since there would be only 3 significant digits
before point while k=4.