This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The value space for xs:float is described in both 1.0 and 1.1 as 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. This is incorrect: it would require 33 bits to represent this value space. In fact, single precision floating point allocates 1 bit for the sign, 8 bits for the exponent, and 23 bits for the (unsigned) mantissa. The description should read: 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^23, and e is an integer between -149 and 104, inclusive. Michael Kay
(In reply to comment #0) > 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. > > This is incorrect: it would require 33 bits to represent this value space. In > fact, single precision floating point allocates 1 bit for the sign, 8 bits for > the exponent, and 23 bits for the (unsigned) mantissa. The description should read: > > 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^23, and e is an integer between -149 > and 104, inclusive. No, the description is correct. Because float and double do not carry variable precision, ANSI/IEEE 754 was able to design the bit layout so that for "normal" numbers, there is an implied 1 bit tacked onto the unsigned m. (BTW, "mantissa" is the wrong word; the mantissa is the fractional part of the log of m.) For "subnormal" numbers, the extra 1 bit is not tacked on; this allows filling in the region between zero and the smallest "normal" number. "Normal" in this sense means that the number is expressible with an m and e such than 2^23 <= m (in addition to the general requirement of 0 < m < 2^24 and -149 <=e <= 104 ).
Having examined this issue in some detail, I can confirm that Dave Peterson's response is accurate. As part of a general cleanup of the datatypes issues, I'm going to close this marked WORKSFORME. Michael, if you are unsatisfied with this resolution, please let us know. Thanks.