aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
Commit message (Collapse)AuthorAge
* Always use the "LL" suffix on 64-bit integer literals.drh2023-07-08
| | | FossilOrigin-Name: 07d95ed60f0a17ea13b4bc19c2ab2ec9052fedd27c9e1e57a1ec6e3a6470e5b7
* Fix harmless scan-build warnings.drh2023-07-08
| | | FossilOrigin-Name: beab3c98639be531744e60440223bb9ee76bc15234aff05e5efb273c8241dfd8
* Omit the use of memmove() in sqlite3FpDecode() in an attempt to avoiddrh2023-07-07
| | | | | | spurious warnings from valgrind. Also makes the code slightly smaller and faster. FossilOrigin-Name: b409943af00e35ad05906d0a80ffa1225a66f3d807c131e00cfbf6671a03a981
* This is alternative work-around for the x86 float-point problem that usesdrh2023-07-05
| | | | | "volatile" rather than compile-specific #pragmas. FossilOrigin-Name: 1d972a690fdc70ab40862bd38427d68b48e8802ddf8e5c301f2d58ce2178b6ec
* Improved comments on the work-around to the GCC x86 floating point wonkiness.drh2023-07-05
| | | FossilOrigin-Name: 7b4c16731e7bf6f03f5adf4fcb2008c0b19be473fb1b90b405c217c08916586a
* Work around for an apparent GCC bug. Seedrh2023-07-05
| | | | | [forum:/info/ee7278611394034c|forum post ee7278611394034c] for details. FossilOrigin-Name: 5d9e9364808793d65925d4efbfde0f4246df258758f15e8ce1105070d1018fe6
* Make the order of operations explicit for the error term of Dekkerdrh2023-07-05
| | | | | double-precision multiply. FossilOrigin-Name: 28f57b34e6b11184a36e363a985e7531bddd7be48a5e039a670e5acf748eedda
* Simplification of the dekkerMul2() subroutine.drh2023-07-05
| | | FossilOrigin-Name: bfe6432a46fd41bfadf4516a73b4e2523d9b453c3e4486fe6df7e1d25275dfb3
* Enhance sqlite3AtoF() so that it honors the USELONGDOUBLE test-control.drh2023-07-03
| | | | | Enable the test/atof1.test module on non-intel platforms. FossilOrigin-Name: b7850fd480535980d66f107c2746e7f7fc0a5379ec8244d84f7785533c83f276
* Whether or not to use the long-double floating point conversion techniquedrh2023-07-03
| | | | | is now a test-control setting. FossilOrigin-Name: 02ae6caff1f7925c696ad263fe78b1036364d24b6373e1baec10d53aafb14a12
* New test cases for floating-point conversions.drh2023-07-03
| | | FossilOrigin-Name: 9435ed76cd9bb1be02768b3853a2323834f67bda75d3e3f76f6aa7bd0bade3d7
* Final clean-up of the idea of using Dekker double-precision floatingdrh2023-07-03
| | | | | computations to improve accuracy. FossilOrigin-Name: 40285d631072b79aba39cc20d4b217bdf0069f29ac9902cb97dec28d3e4cde11
* Squeeze as many bits as we can out of normalization.drh2023-07-03
| | | FossilOrigin-Name: 25d1ad6df1ed460c2cc9f32e8a5106e121ae502044f83abf431c1d5b3879eb56
* Faster Dekker multiplication that removes the restriction on input magnitude.drh2023-07-03
| | | FossilOrigin-Name: 2994caf5884be07c889519c78fbac4ddcf267fcfe6a3265ecb6390bcd574532e
* Fix one constant in the normalization logic. Improved error outputdrh2023-07-03
| | | | | from atof1.test. FossilOrigin-Name: d3c48807100a358a70fdd799c8935eba1b765ace2e1ddea4475fd673006cb6da
* Replace the dodgy error estimating logic in the previous check-in withdrh2023-07-03
| | | | | | full-up Dekker double-double multiplication, and this idea works much better. There are still a few inaccuracies, but it is much closer. FossilOrigin-Name: 4fa6938dac2d3d813a37664053db31451a2a065f78dd212488f5f7f8d583ddc5
* An idea for improving accuracy of fp-to-decimal conversion for systems thatdrh2023-07-03
| | | | | | do not have "long double". Does not quite work. Retained only for documentation purposes. FossilOrigin-Name: 702243333843219f8904ee0fd12283080d6c6b3fc1ffb36c534cdefb3563c00d
* This check-in adds the use of "long double" to sqlite3FpDecode() which whendrh2023-07-01
| | | | | | | run on x86 using a compiler that translates "long double" into binary80, causes all legacy tests to pass. But on a system where "long double" is just an alias for "double", some of the tests are still failing. FossilOrigin-Name: ce06982f880339cf46704e95c907249827c3e44af2b9420005200ca8abd3f371
* Improved rounding policy.drh2023-07-01
| | | FossilOrigin-Name: 6f1122e942b8269552daaf13d647d200d8546ec25f36310d67037c6b58d09976
* Improved response to Infinity and NaN. Remove the termporary fpdecode()drh2023-07-01
| | | | | function. FossilOrigin-Name: 76ab8ae809a47a66688e2d50c20dc87ce946d82e9ffebb3adda55c451fad07fc
* Progress towards fixing corner-case floating-point formatting issues.drh2023-07-01
| | | FossilOrigin-Name: 1138b8d16edef16d2943d407e289d07d546a14e64c3efa3c94127631e06fafeb
* Begin cutting over sqlite3FpDecode() into printf(). The code in thisdrh2023-06-30
| | | | | | check-in gets a lot right, but there are still some formatting discrepencies. FossilOrigin-Name: c134d423e79ba5d3343d7480229822a0c83210f67f12129e0237181f892f97a5
* Add decimal rounding to the sqlite3FpDecode() routine.drh2023-06-30
| | | FossilOrigin-Name: 27871140caa833f0bc0962e44356993938e93dcf81c1074382b1560a3e1aeb61
* Experiments with a new algorithm for converting ieee-754 binary64 numbersdrh2023-06-30
| | | | | into decimal. FossilOrigin-Name: e923405e448385085224f9289991b303d86b02763535ea77d6fcee98ba6fc1f2
* Completely unwind the enhanced precision sum() from [a915f15a916af698] sodrh2023-06-30
| | | | | as not to offend UBSAN and OSS-Fuzz. FossilOrigin-Name: 85be05b66ef975f02a3e7b2984bcab97d9280c7f3b6ee1e16718de549f240d46
* Make the sum() function less precise and slower in order to avoiddrh2023-06-30
| | | | | harmless signed integer overflow UBSAN warnings from OSS-Fuzz. FossilOrigin-Name: 1be0646a2c352dbf03d2af87fd48b6f9edfd68666790ac6863144ac95f3e0621
* Enhance the SUM() aggregate (and related AVG() and TOTAL()) so that the runningdrh2023-06-28
|\ | | | | | | | | sum is accurate to about 100 bits. FossilOrigin-Name: a915f15a916af698e0cef46c8b3e7ed11bda19349179d2d414073cd39c4cce24
| * Use ideas from T. J. Dekker in "A Floating-Point Technique for Extending thedrh2023-06-26
| | | | | | | | | | | | Available Precision" (1971-07-26) to enhance the accuracy of the SUM() aggregate function in cases where input magnitudes vary wildly. FossilOrigin-Name: 439fc00fee62b4db3751860485e21a99cae4fd1f5d911b2c08651a1466245ecc
* | Improved accuracy of floating-point conversion constants as suggested bydrh2023-06-28
|/ | | | | [forum:/info/598d32f6135c41c1|forum post 598d32f6135c41c1]. FossilOrigin-Name: 4943e8a1819e189747eefc414d02c0485e1620deff9cf92664295b21a8a9a83c
* Add a C-source spell-checking facility. make misspell (on Nix)larrybr2023-06-07
| | | FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
* Add support for hexadecimal integer literals in JSON.drh2023-04-27
| | | FossilOrigin-Name: 85e00c9e68d0695592e8f72555ee133c096bfca5a860a8e21d1e0ef756705aaf
* Attempt to suppress harmless compiler warnings reported bydrh2023-04-19
| | | | | [forum:/forumpost/fc98845c06|forum post fc98845c06]. FossilOrigin-Name: f6e6c5f94cef83645288568a344a0ff64e4ef17b10fab28996567a94db0a002a
* Small performance enhancement to integer-to-text conversion.drh2023-04-12
| | | FossilOrigin-Name: cfb3dba9b015ce7a75857978bfd2540b4d5be985d9d2ec4a5842b3089ed3da60
* Fix sqlite3_prepare() so that it only invokes the progress handler on everydrh2023-01-12
| | | | | | | N-th call to sqlite3ProgressCheck(), where N is the progress handler step count. Also fix faulty asserts exposed by the ability to interrupt in the middle of sqlite3_prepare(). FossilOrigin-Name: 05461651599bb490ac6cfd893645dabab9cccedc6adcce15aee2487b2ea6027a
* Attempt to provide a mechanism to do early termination of long-runningdrh2023-01-12
| | | | | | | statement preparation by invoking the progress handler at strategic points during sqlite3_parpare(). This experiment shows that sqlite3_prepare() might leave the resulting prepared statement uninitialized following an interrupt. FossilOrigin-Name: 79636f2d80aee70832913a78933da2a7e30cc037810b93903ebbc1925ea93fef
* Avoid an unnecessary call to strlen() in the sqlite3VdbeMemStringify() routine,drh2023-01-03
| | | | | for a performance increase and size reduction. FossilOrigin-Name: 284382d37850f469dc4bf3ab8efd2f20971554e897f1ba3e94d3f2f0c35d97d0
* Enhance the sqlite3_stmt_scanstatus() API and add ↵dan2022-12-02
| | | | | sqlite3_stmt_scanstatus_v2(). For creation of easier to read query performance reports. FossilOrigin-Name: 55800833645739efeddcacef464c623931cb6aeb43f4219b4e4faf473c25c8bb
* Change the handling of hwtime.h to make it easier to compile performancedrh2022-11-29
| | | | | | measurement builds that make use of hwtime.h. This should not affect productions builds. FossilOrigin-Name: f64a224244743ab121371abd516fccbfc93c110e0952211764bd1b217e792c1b
* Fix an assert() associated with the dbsqlfuzz error at [8372468bb5d8922c].drh2022-09-02
| | | FossilOrigin-Name: 54251f81ebc43839cc97f91d2df4c320c1b96b5690cc11ce45b60c087c9becd6
* Remove many redundant checks for sqlite3.mallocFailed now that any OOM shoulddrh2022-01-24
| | | | | cause Parse.nErr to be non-zero. FossilOrigin-Name: 1f7fa46126ea33ed30e93186aff3df51068aeb4be6f79a102bfe8c4e44941d71
* Make it so that any Parse object is always linked into the database conenctiondrh2022-01-24
| | | | | while it is active. Hence, an OOM will cause Parse.nErr to be set. FossilOrigin-Name: 6a45d8fe8bfbc11a5b86d25237e1f8bccfb0f22f3dcaf004ba797aeb57b365ec
* Add the sqlite3_error_offset() interface. Use it in the CLI to providedrh2021-12-24
| | | | | better context for error messages. FossilOrigin-Name: b518ce77439852759bc0901071f36d622b1314c9bf3d29c279dfcc405188b975
* Add SQLITE_TESTCTRL_LOGEST and enhance the LogEst utility program.drh2021-12-09
| | | | | Improvements to testability of bloom filters. FossilOrigin-Name: 88b43d798cc5aa59855e92d3e658aee9f0a5def6ffbc5db77af048d75ecdf8cc
* Omit the OP_FilterInit opcode. Use OP_Blob to initialize each Bloom filterdrh2021-12-06
| | | | | | instead. Size the Bloom filter based on sqlite_stat1 size estimates rather than a run-time measurement for improved testability. FossilOrigin-Name: 8a9036ee617a6ad93bfe827b0789773c49d3d45b085cb76fa4b9b20a41b79b97
* Enabled the testcase() macros under SQLITE_DEBUG.drh2021-10-20
| | | FossilOrigin-Name: 0ae8dd132db8331ca9cc42ad511066924f9d3a1d158ecdb630cebc41b6bd2493
* Protect all accesses to the FuncDef.u and Expr.u unions using nearbydrh2021-10-07
| | | | | assert()s or branches. FossilOrigin-Name: 9af863f065e0bef491c2ab7525194505f9516f4e6dfc789d2e3a9d2c2438533a
* Restore the use of system isnan() that was removed bydrh2021-09-06
| | | | | | check-in [ea748edecb261f2b]. See [forum:/forumpost/d7c530ac587f59e6|forum thread d7c530ac587f59e6]. FossilOrigin-Name: b3cfe23bec0b95ca673802526704200e2396df715fdded72aa71addd7f47e0e1
* Rename the Column.eType field to Column.eCType - with an extra "C".drh2021-08-18
| | | FossilOrigin-Name: b9b0dcd5af072c22f2ce71cf9584b5b572fbcfbce6410a7d703b586adb8938ba
* Refactor sqlite3.magic into sqlite3.eOpenState.drh2021-08-07
| | | FossilOrigin-Name: e5d6512aa1fa0016a679c6e0cb665a0c67ad16f1daa0c18a96b2ebae1beefd15
* Fix harmless compiler warnings. Omit redundant copies of os_common.h anddrh2021-08-06
| | | | | hwtime.h from the amalgamation. FossilOrigin-Name: 091427007818537bb2f860c42dad867cb19050899186d4d180d195a1c6a98798