SQLite

Check-in [ea6a03a89d]
Login

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

Overview
Comment:Improvements to the sqlite3IntFloatCompare() routine for systems that lack the long double type.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | int-float-compare
Files: files | file ages | folders
SHA3-256: ea6a03a89dc23e860e53e79ec3fddf0ae7072a23b73aef3d2d181b426566b677
User & Date: drh 2018-05-18 13:39:00.453
Context
2018-05-18
14:19
Remove incorrect NEVER() macro added by the previous check-in. (Closed-Leaf check-in: 3d66251113 user: drh tags: int-float-compare)
13:39
Improvements to the sqlite3IntFloatCompare() routine for systems that lack the long double type. (check-in: ea6a03a89d 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: 33dc8fad7f user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbeaux.c.
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
    if( x<r ) return -1;
    if( x>r ) return +1;
    return 0;
  }else{
    i64 y;
    double s;
    if( r<-9223372036854775808.0 ) return +1;
    if( r>9223372036854775807.0 ) return -1;
    y = (i64)r;
    if( i<y ) return -1;
    if( i>y ){
      if( y==SMALLEST_INT64 && r>0.0 ) return -1;
      return +1;
    }
    s = (double)i;
    if( s<r ) return -1;
    if( s>r ) return +1;
    return 0;
  }
}

/*
** Compare the values contained by the two memory cells, returning
** negative, zero or positive if pMem1 is less than, equal to, or greater







|


|
<
<
<


|







3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923



3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
    if( x<r ) return -1;
    if( x>r ) return +1;
    return 0;
  }else{
    i64 y;
    double s;
    if( r<-9223372036854775808.0 ) return +1;
    if( r>=9223372036854775808.0 ) return -1;
    y = (i64)r;
    if( i<y ) return -1;
    if( i>y ) return +1;



    s = (double)i;
    if( s<r ) return -1;
    if( NEVER(s>r) ) return +1;
    return 0;
  }
}

/*
** Compare the values contained by the two memory cells, returning
** negative, zero or positive if pMem1 is less than, equal to, or greater