Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From 6935ac71bad3d36c To round-up-2
2024-06-12
| ||
11:39 | Slight API doc tweak for xCheckReservedLock(), based on forum feedback. No code changes. (check-in: 2af7a96f68 user: stephan tags: trunk) | |
10:17 | Improvements to the layout and comments for the new round() implementation. (Leaf check-in: d6b1df1a22 user: drh tags: round-up-2) | |
00:30 | Test cases for the round() function for values within one epsilon of the 5 round-up threshold. (check-in: 552b1b1066 user: drh tags: round-up-2) | |
2024-06-11
| ||
22:47 | A second approach to working on the round() function so that it gives a small boost to numbers that are ...49999999 such that they round up. (check-in: 44dd632896 user: drh tags: round-up-2) | |
20:03 | Fix a problem with rolling back hot journals using the unix-dotfile VFS. (check-in: 4ae3300b79 user: dan tags: unix-dotfile-fix) | |
17:37 | Merge trunk enhancements into the exists-to-join branch. (check-in: 5f25a9518a user: drh tags: exists-to-join) | |
17:04 | Remove some dead JS code and update some JS docs. (check-in: 6935ac71ba user: stephan tags: trunk) | |
17:04 | When compiling shell.c in SQLITE_SHELL_FIDDLE mode, ensure that the shell_main_exit goto label is reachable. (check-in: 06e6f64533 user: stephan tags: trunk) | |
Changes to src/func.c.
︙ | |||
431 432 433 434 435 436 437 438 439 440 441 442 | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + - - - - + | p2 = len-p1; if( p2<0 ) p2 = 0; } sqlite3_result_blob64(context, (char*)&z[p1], (u64)p2, SQLITE_TRANSIENT); } } /* ** The library round() function is only available if ** SQLITE_ENABLE_MATH_FUNCTIONS is defined. Without that macro, we ** have to grow our own. ** ** The sqlite3Round(x) routine only needs to deal with non-negative ** numbers. */ #ifdef SQLITE_ENABLE_MATH_FUNCTIONS # define sqlite3Round(X) round(X) #else static double sqlite3Round(double x){ assert( x>=0.0 ); if( x>+4503599627370496.0 ){ return x; }else{ sqlite3_int64 ii = (sqlite3_int64)(x+0.5); return (double)ii; } } #endif /* ** This is the value of the least significant bit of the significand ** relative to the total magnitude of the number for an IEEE754 binary64. ** Since the significant is 53 bits, this is pow(2,-52). */ #define SQLITE_DOUBLE_EPSILON 2.220446049250313080847263336181640625e-16 /* ** Implementation of the round() function */ #ifndef SQLITE_OMIT_FLOATING_POINT static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ |
︙ | |||
2501 2502 2503 2504 2505 2506 2507 | 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 | - | int argc, sqlite3_value **argv ){ assert( argc==0 ); (void)argv; sqlite3_result_double(context, M_PI); } |
︙ |
Added test/round2.test.
|