[Bug 2643] [F+O] Conversion from double to float

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2643





------- Additional Comments From fornaresh@yahoo.com  2006-01-05 17:42 -------
(In reply to comment #0)
I believe the value space specified for float in XML Schema Part 2 is correct. 
XML Schema states that "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."

IEEE754 single-precision floating point representation has 1 sign bit, 8 
exponent bits and 23 physical mantissa bits + 1 logical mantissa bit. The 
logical mantissa bit is always 1 and hence is not stored in the physical 
representation. But it does result in the absolute value of mantissa being 
(2^24-1).

Similar argument applies to double precision floating point, where there are 
52 physical mantissa bit + 1 logical mantissa bit, which results in absolute 
value of mantissa being (2^53-1).

Having argued that the values spaces for float and double in XML Schema are 
correct, I do agree that the F&O has a typo in the range you point out below. 
The range should read:
 (-2^24-1 to +2^24-1), and not
 (-2^24+1 to +2^24-1)

Received on Thursday, 5 January 2006 17:42:51 UTC