<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>2643</bug_id>
          
          <creation_ts>2006-01-05 13:18:30 +0000</creation_ts>
          <short_desc>[F+O] Conversion from double to float</short_desc>
          <delta_ts>2006-01-17 16:23:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Ashok Malhotra">ashok.malhotra</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7622</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-01-05 13:18:30 +0000</bug_when>
    <thetext>In 17.1.3.1 we have blindly copied from XML Schema Part 2 the assertion that the
mantissa of a single-precision floating point number is in the range (-2^24+1 to
+2^24-1). This is incorrect. It is actually in the range (-2^23+1 to +2^23-1).

I have reported this as a bug against XML Schema Part 2:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2642</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7639</commentid>
    <comment_count>1</comment_count>
    <who name="Naresh Chainani">fornaresh</who>
    <bug_when>2006-01-05 17:42:37 +0000</bug_when>
    <thetext>(In reply to comment #0)
I believe the value space specified for float in XML Schema Part 2 is correct. 
XML Schema states that &quot;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.&quot;

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&amp;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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7857</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-01-17 16:21:39 +0000</bug_when>
    <thetext>Thank you for the clarification. I am withdrawing this comment.

Michael Kay</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>