SQLite

Check-in [9780b23ca3]
Login

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

Overview
Comment:Fix an error in [b22cdd67] that can cause a negative infinity to be (rarely) reported as a positive infinity.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9780b23ca375de6a542516fbc03eb39d5a393ca577718fda231d0d0ccf3b1c7e
User & Date: drh 2017-09-12 15:05:34.004
Context
2017-09-12
23:58
Remove use of the rand_s() function (added by [139081bef9f63c3e]) as it appears to cause issues with some third-party DLLs. (check-in: 3a2793aa65 user: mistachkin tags: trunk)
18:49
Add the highly-experimental "PRAGMA noop_update=TRUE" command. (Leaf check-in: de2e371757 user: drh tags: pragma-noop-update)
18:03
Hack to have multiple connections to a single file share a single memory mapping of the databse file. (check-in: ec37ad6d08 user: dan tags: shared-mapping-hack)
15:05
Fix an error in [b22cdd67] that can cause a negative infinity to be (rarely) reported as a positive infinity. (check-in: 9780b23ca3 user: drh tags: trunk)
13:27
Changes to (hopefully) get the build working with recent Intel compilers. (check-in: b22cdd6734 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/util.c.
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
            result *= 1.0e+308;
          }
        }else{ assert( e>=342 );
          if( esign<0 ){
            result = 0.0*s;
          }else{
#ifdef INFINITY
            result = INFINITY;
#else
            result = 1e308*1e308*s;  /* Infinity */
#endif
          }
        }
      }else{
        /* 1.0e+22 is the largest power of 10 than can be 







|







488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
            result *= 1.0e+308;
          }
        }else{ assert( e>=342 );
          if( esign<0 ){
            result = 0.0*s;
          }else{
#ifdef INFINITY
            result = INFINITY*s;
#else
            result = 1e308*1e308*s;  /* Infinity */
#endif
          }
        }
      }else{
        /* 1.0e+22 is the largest power of 10 than can be 
Changes to test/nan.test.
362
363
364
365
366
367
368
369
370

371

372
373
  db eval {
    DELETE FROM t1;
    INSERT INTO t1 VALUES('2.5e-2147483650');
    SELECT x, typeof(x) FROM t1;
  }
} {0.0 real}

  





finish_test







|
|
>
|
>


362
363
364
365
366
367
368
369
370
371
372
373
374
375
  db eval {
    DELETE FROM t1;
    INSERT INTO t1 VALUES('2.5e-2147483650');
    SELECT x, typeof(x) FROM t1;
  }
} {0.0 real}

do_realnum_test nan-4.40 {
  db eval {
    SELECT cast('-1e999' AS real);
  }
} {-inf}

finish_test