/ Check-in [5139ea62]
Login

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

Overview
Comment:Improvements to integer/float comparisons on architectures that lack a "long double" type.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:5139ea62a8a6c6dc6558c337de39bcbadd26f6515742263387be03c862c78cf0
User & Date: drh 2018-05-18 14:24:23
Context
2018-05-18
17:11
In the CLI, detect and report errors on sqlite3_close(). Clear global variables prior to exit to so that valgrind can better detect resource leaks. check-in: e3b2e0a0 user: drh tags: trunk
14:24
Improvements to integer/float comparisons on architectures that lack a "long double" type. check-in: 5139ea62 user: drh tags: trunk
14:19
Remove incorrect NEVER() macro added by the previous check-in. Closed-Leaf check-in: 3d662511 user: drh tags: int-float-compare
2018-05-17
20:04
In the CLI with the -A command, if the file does not previously exist and its name looks like a ZIP archive name, then create it as a ZIP archive. check-in: 33dc8fad user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/vdbeaux.c.

  3913   3913       if( x<r ) return -1;
  3914   3914       if( x>r ) return +1;
  3915   3915       return 0;
  3916   3916     }else{
  3917   3917       i64 y;
  3918   3918       double s;
  3919   3919       if( r<-9223372036854775808.0 ) return +1;
  3920         -    if( r>9223372036854775807.0 ) return -1;
         3920  +    if( r>=9223372036854775808.0 ) return -1;
  3921   3921       y = (i64)r;
  3922   3922       if( i<y ) return -1;
  3923         -    if( i>y ){
  3924         -      if( y==SMALLEST_INT64 && r>0.0 ) return -1;
  3925         -      return +1;
  3926         -    }
         3923  +    if( i>y ) return +1;
  3927   3924       s = (double)i;
  3928   3925       if( s<r ) return -1;
  3929   3926       if( s>r ) return +1;
  3930   3927       return 0;
  3931   3928     }
  3932   3929   }
  3933   3930