jkesselm    02/02/05 07:11:26

  Modified:    java/src/org/apache/xpath/objects XStringForFSB.java
  Log:
  Bug 5346: One more (last, I hope) edge case.
  
  Revision  Changes    Path
  1.13      +6 -5      
xml-xalan/java/src/org/apache/xpath/objects/XStringForFSB.java
  
  Index: XStringForFSB.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XStringForFSB.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XStringForFSB.java        5 Feb 2002 14:19:55 -0000       1.12
  +++ XStringForFSB.java        5 Feb 2002 15:11:25 -0000       1.13
  @@ -1050,12 +1050,13 @@
        // We have a potential overflow issue that we need
        // to guard against. See Bugzilla 5346.
        //
  -     // %REVIEW% MUST BE RECONSIDERED  since this may not be
  -     // fully compliant with the IEEE floating-point spec. (On the
  -     // other hand, it's wicked fast compared to the usual solution,
  -     // and works fine for all but a very few edge cases.)
  +     // %REVIEW% MUST BE RECONSIDERED. I _think_ the truncation of
  +     // the 64-bit long before it overflows is well within the acceptable
  +     // error range of the double's 53-bit mantissa...
        if(longResult>MAX_NO_OVERFLOW_RISK)
  -       ++overflow;
  +     {
  +       if(digitType==0) ++overflow;
  +     }
        else
        {
          longResult=longResult*10 + (c - '0');
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to