Canonical lexical form for float and double

It has been brought to my attention that there may be an error in the
specification of the canonical lexical form for float/double.  The
current specification for float is below.  Double is similar.

Specifically, the exponent must be indicated by "E". Leading zeroes and
the preceding optional "+" sign are prohibited in the exponent. For the
mantissa, the preceding optional "+" sign is prohibited and the decimal
point is required. For the exponent, the preceding optional "+" sign is
prohibited. Leading and trailing zeroes are prohibited subject to the
following: number representations must be normalized such that there is
a single digit to the left of the decimal point and at least a single
digit to the right of the decimal point.

The problem is that the single digit to the left of the decimal point is
allowed to be zero.  This allows 1.0E1, 0.1E02 and 0.01E3 etc. as legal
canonical representations for the same number.

A proposed resolution to this potential errata is to amend the above
text after the colon as follows:

number representations must be normalized such that there is a single
non-zero digit to the left of the decimal point and at least a single
digit to the right of the decimal point.  Zero is represented by '0.0E1'
and '-0.0E1'.

My one concern is that to represent very large numbers it may not be
possible to have just a single number to the left of the decimal point
in the mantissa.  This needs to be checked.  Dave P, can you help here? 


All the best, Ashok 
===========================================================
Ashok Malhotra              <mailto: ashokma@microsoft.com> 
Microsoft Corporation

Received on Thursday, 29 November 2001 12:51:23 UTC