W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

(invalid?) floats and doubles in NIST's validation testsuite

From: Anli Shundi <ashundi@tibco.com>
Date: Tue, 9 Oct 2001 10:42:47 -0400 (EDT)
Message-ID: <339902DC0E58D411986A00B0D03D8432E9BDB0@extmail.extensibility.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>

many of the floats and doubles in the NIST validation
testsuite at http://www.w3.org/2001/05/xmlschema-test-collection/
are IMO out of range.  According to the spec:

float corresponds to the IEEE single-precision 32-bit floating point type
[IEEE 754-1985]. The basic ˇvalue spaceˇ of float consists of the values m ×
2^e, where m is an integer whose absolute value is less than 2^24, and e is
an integer between -149 and 104, inclusive. 

The lexical representation uses the decimal powers
though.  Thus the biggest representable float short of
infinity is 2^24 * 2^104 = 3.40283E38 .  The testsuite
uses floats such as 16777215.999999999999E104 which
is IMO invalid, since it's out of float's value space.
(Note that 2^24 = 16777216 in the above case)

Such floats and doubles with absolute values greater
than 1.79E308 or smaller than 4.94E-324 are throughout
the testsuite and they are all considered valid ?!

Question: does the E in lexical representation actually 
stand for binary or decimal powers?

Anli Shundi                      ashundi@tibco.com
Product Development Group        office: (919) 969-6518
TIBCO Software Inc.              

www.extensibility.com  |  www.XMLschema.com  |  www.tibco.com
Received on Tuesday, 9 October 2001 11:12:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:54 UTC