/ Check-in [59bb999c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Performance improvement for ascii to floating-point conversions with very large exponents.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 59bb999c8ba5e4ee7a4e388fc724b8606136d60c
User & Date: drh 2011-10-17 12:14:26
Context
2011-10-17
20:41
Avoid 32-bit integer overflow when evaluating the exponent of a floating point value during ascii to binary conversion. check-in: 4becc47e user: drh tags: trunk
12:14
Performance improvement for ascii to floating-point conversions with very large exponents. check-in: 59bb999c user: drh tags: trunk
2011-10-15
00:16
Added the tool/warnings-clang.sh script. Changes so that there are no warnings with either gcc or clang even including FTS4 and RTREE and both with and without SQLITE_THREADSAFE=0. check-in: 39408702 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/util.c.

   378    378           if( esign<0 ){
   379    379             result = s / scale;
   380    380             result /= 1.0e+308;
   381    381           }else{
   382    382             result = s * scale;
   383    383             result *= 1.0e+308;
   384    384           }
          385  +      }else if( e>=342 ){
          386  +        if( esign<0 ){
          387  +          result = 0.0*s;
          388  +        }else{
          389  +          result = 1e308*1e308*s;  /* Infinity */
          390  +        }
   385    391         }else{
   386    392           /* 1.0e+22 is the largest power of 10 than can be 
   387    393           ** represented exactly. */
   388    394           while( e%22 ) { scale *= 1.0e+1; e -= 1; }
   389    395           while( e>0 ) { scale *= 1.0e+22; e -= 22; }
   390    396           if( esign<0 ){
   391    397             result = s / scale;