drh
66422b57f9
Get fault injection for testing working correctly. Other code clean-up.
...
FossilOrigin-Name: ff492277ed00c1f637a5b4ccd6d8193ea22f6781f90073861588a2b7d5c045b7
2023-07-11 15:52:52 +00:00
mistachkin
c0b6112d04
Minor style changes to the previous MSVC makefile changes on this branch.
...
FossilOrigin-Name: 4c950872c870a5968fa4cb8840cf60569a66c0e508811ee79992825ec9c02da3
2023-07-10 19:21:09 +00:00
drh
7994d9dab7
Compile for SEH if the USE_SEH=1 option is specified on the nmake command line.
...
FossilOrigin-Name: 0e67a82f6cfe681d4676ac5c92d92e95b9dcc3198df21516bccdde002f5e52ae
2023-07-10 19:13:40 +00:00
drh
5d3cc0c09b
Fix a warning. Unclear yet if the code is correct this way or not.
...
FossilOrigin-Name: 2df4fd76ef48bb63389df8d783059af6b8f2cbb2c11d07953b408e71f50b625b
2023-07-10 18:16:49 +00:00
drh
cc9380f68d
Merge the latest trunk enhancements into the wal-shm-exceptions branch.
...
FossilOrigin-Name: f655d08d019bab0c578886e91ca24fd956d1b3dea9b9c9104812b3cf62e5e556
2023-07-10 18:05:23 +00:00
drh
4c40b7b819
Always use the "LL" suffix on 64-bit integer literals.
...
FossilOrigin-Name: 07d95ed60f0a17ea13b4bc19c2ab2ec9052fedd27c9e1e57a1ec6e3a6470e5b7
2023-07-08 17:42:24 +00:00
drh
bc532ae15f
Fix harmless scan-build warnings.
...
FossilOrigin-Name: beab3c98639be531744e60440223bb9ee76bc15234aff05e5efb273c8241dfd8
2023-07-08 14:27:55 +00:00
drh
50ba4e3efd
Omit the use of memmove() in sqlite3FpDecode() in an attempt to avoid
...
spurious warnings from valgrind. Also makes the code slightly smaller and
faster.
FossilOrigin-Name: b409943af00e35ad05906d0a80ffa1225a66f3d807c131e00cfbf6671a03a981
2023-07-07 18:49:08 +00:00
drh
afef7fc136
For the "Valgrind" test scenario, set LONGDOUBLE_TYPE=double as valgrind
...
does not correctly emulated extended precision on x64.
FossilOrigin-Name: d3532eaed1cc671d8149b1bd34ead2a88fb83502a2898a5f60aea0a7daf18958
2023-07-07 12:18:26 +00:00
drh
bae91082dd
Add option 2 to SQLITE_TESTCTRL_USELONGDOUBLE to move the setting to its
...
defaults. Enhance the CLI and testfixture to make use of this value.
Base the default on sizeof(LONGDOUBLE_TYPE) rather than on sizeof(long double).
FossilOrigin-Name: 64e6bd1c25d8e1dbfe511cba1921ff052c0fa4fe410fc9ce4435700a70cb88b1
2023-07-07 12:08:22 +00:00
drh
7d0103bb06
Improved handling of integer inputs to the new sum() implementation.
...
FossilOrigin-Name: 31561c63bde6af2210296810fd66232b935033b4d26273a6b8a52142c54b4e12
2023-07-06 20:34:06 +00:00
drh
68c88ea04f
A more precise implementation of sqlite3RealToI64().
...
FossilOrigin-Name: 8813317cb52990d90bd48de163b6e35ddcad2b6f3187aa28b28e2e088b4489ce
2023-07-06 18:29:15 +00:00
drh
ff96718b52
Merge all recent trunk enhancements into the wal-shm-exceptions branch.
...
FossilOrigin-Name: e59cea2d851be68559e7d01a01cb05684c44d151d022ea9790ce99671016ab00
2023-07-06 17:55:33 +00:00
drh
3e1e7aad3d
Fix octet_length() test cases so that they work when the database encoding
...
is utf16.
FossilOrigin-Name: ad2e39626e6115fd322ef9495ae3bcd91343d7131a725f1bf24211a51a21dcc2
2023-07-06 17:14:47 +00:00
drh
59f13119cf
Use the Kahan-Babushka-Neumaier algorithm to improve the accuracy of sum().
...
FossilOrigin-Name: c63e26e705f5e967e14ef6aea8ce226548293ad8d25066069f29fa89673913d2
2023-07-06 15:44:38 +00:00
drh
26cd8bc1af
Fix minor inaccuracies in the new sum() algorithm.
...
FossilOrigin-Name: e3f7a960c9bd8e84cd70f0585bb955d043604a92001d0e2bf6c1216bb1fd7221
2023-07-06 14:45:53 +00:00
drh
45d7562843
Experimental attempt to boost the accuracy of sum() using the
...
Kahan-Babuska-Neumaier algorithm.
FossilOrigin-Name: ebc5edd3b10c1102b07b9fb0d6837266b81e55504ef883b9b8a7ad5e8ab29dd2
2023-07-06 13:19:10 +00:00
drh
3748b7329f
Use "volatile" isntead of "#pragma" to get floating point calculations
...
working correctly when compiling with GCC for x86 machines.
FossilOrigin-Name: 9427f42687ed6d97c474bf42d0c3e82d6f4b0075e74206adcb5699d72e32140e
2023-07-06 00:55:06 +00:00
drh
efd0cf87df
This is alternative work-around for the x86 float-point problem that uses
...
"volatile" rather than compile-specific #pragmas.
FossilOrigin-Name: 1d972a690fdc70ab40862bd38427d68b48e8802ddf8e5c301f2d58ce2178b6ec
2023-07-05 22:05:18 +00:00
drh
728650ecb3
Improved comments on the work-around to the GCC x86 floating point wonkiness.
...
FossilOrigin-Name: 7b4c16731e7bf6f03f5adf4fcb2008c0b19be473fb1b90b405c217c08916586a
2023-07-05 19:56:14 +00:00
drh
e68899f1e4
Work around for an apparent GCC bug. See
...
[forum:/info/ee7278611394034c|forum post ee7278611394034c] for details.
FossilOrigin-Name: 5d9e9364808793d65925d4efbfde0f4246df258758f15e8ce1105070d1018fe6
2023-07-05 18:59:52 +00:00
drh
85ca6d7ace
Make the order of operations explicit for the error term of Dekker
...
double-precision multiply.
FossilOrigin-Name: 28f57b34e6b11184a36e363a985e7531bddd7be48a5e039a670e5acf748eedda
2023-07-05 15:34:30 +00:00
drh
1790ccb98b
Simplification of the dekkerMul2() subroutine.
...
FossilOrigin-Name: bfe6432a46fd41bfadf4516a73b4e2523d9b453c3e4486fe6df7e1d25275dfb3
2023-07-05 14:42:50 +00:00
drh
6aa5a42beb
Add the ieee754_inc(r,N) function to the ieee754.c extension.
...
FossilOrigin-Name: 9a36f269451d8832f68e223ac3995493704364e7fd0cc772989c96e863a08d29
2023-07-05 12:00:32 +00:00
drh
7623795018
Enhance the sqlite3AtoF() function so that it can operate with or without
...
long double and provides accurate results in both cases.
FossilOrigin-Name: fd987508d5589d42b46625c97cfb2feeac70fdb1cb11224610554b07a60644e6
2023-07-03 18:32:29 +00:00
drh
aa4356da68
Enhance sqlite3AtoF() so that it honors the USELONGDOUBLE test-control.
...
Enable the test/atof1.test module on non-intel platforms.
FossilOrigin-Name: b7850fd480535980d66f107c2746e7f7fc0a5379ec8244d84f7785533c83f276
2023-07-03 18:18:35 +00:00
drh
930e4167bd
Store the fp-speed-1.c test program used to measure relative performance of
...
SQLite versus the standard library, in the test/ directory. A header comment
explains how to use it.
FossilOrigin-Name: eaff376277edceb043e9aac9d2df3e1157f576605508733be8a0a0aa4d720e1d
2023-07-03 15:30:50 +00:00
drh
521f20e3d3
Add the --nolongdouble option to speedtest1.c.
...
FossilOrigin-Name: 6bf6018a00d61c5f0e53b37b00befaf5ad1d85323f41cf0cea25d8c6c1017096
2023-07-03 15:11:28 +00:00
drh
c9f240cea4
Improved precision of binary-to-decimal conversion of floating-point values
...
on all systems but especially non-x86 systems that lake extended precision
hardward floating point.
FossilOrigin-Name: 32befb224b254639e756fd493f300507ff60c5222e00a7338dbcd39140133964
2023-07-03 15:03:59 +00:00
drh
1b3c6e727e
Whether or not to use the long-double floating point conversion technique
...
is now a test-control setting.
FossilOrigin-Name: 02ae6caff1f7925c696ad263fe78b1036364d24b6373e1baec10d53aafb14a12
2023-07-03 14:56:49 +00:00
drh
0478d1d88a
New test cases for floating-point conversions.
...
FossilOrigin-Name: 9435ed76cd9bb1be02768b3853a2323834f67bda75d3e3f76f6aa7bd0bade3d7
2023-07-03 12:58:18 +00:00
drh
b884158434
Use Dekker double-precision floating point to do the value normalization
...
step in sqlite3FpDecode() for systems on which "long double" is 8 bytes or
less.
FossilOrigin-Name: 51f492b440728151ce64168d5436ba87ca60d84b89408e47c593fa731355afe4
2023-07-03 11:44:15 +00:00
drh
841e596ad0
Final clean-up of the idea of using Dekker double-precision floating
...
computations to improve accuracy.
FossilOrigin-Name: 40285d631072b79aba39cc20d4b217bdf0069f29ac9902cb97dec28d3e4cde11
2023-07-03 11:39:38 +00:00
drh
bc2b65832e
Squeeze as many bits as we can out of normalization.
...
FossilOrigin-Name: 25d1ad6df1ed460c2cc9f32e8a5106e121ae502044f83abf431c1d5b3879eb56
2023-07-03 10:35:29 +00:00
drh
5270d7424d
Faster Dekker multiplication that removes the restriction on input magnitude.
...
FossilOrigin-Name: 2994caf5884be07c889519c78fbac4ddcf267fcfe6a3265ecb6390bcd574532e
2023-07-03 10:18:02 +00:00
drh
37b188fbca
Fix one constant in the normalization logic. Improved error output
...
from atof1.test.
FossilOrigin-Name: d3c48807100a358a70fdd799c8935eba1b765ace2e1ddea4475fd673006cb6da
2023-07-03 10:00:38 +00:00
drh
c8885d42fe
Replace the dodgy error estimating logic in the previous check-in with
...
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
2023-07-03 09:07:23 +00:00
drh
c27bda0b79
An idea for improving accuracy of fp-to-decimal conversion for systems that
...
do not have "long double". Does not quite work. Retained only for
documentation purposes.
FossilOrigin-Name: 702243333843219f8904ee0fd12283080d6c6b3fc1ffb36c534cdefb3563c00d
2023-07-03 00:40:37 +00:00
drh
fecdff4354
This check-in adds the use of "long double" to sqlite3FpDecode() which when
...
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
2023-07-01 20:21:27 +00:00
drh
453be55b85
Reinstate the fpdecode() SQL function for testing, but only when compiled
...
with SQLITE_DEBUG.
FossilOrigin-Name: 07eab52e0801bb0e4743b304a06ad16e18cdf8eaa18c0faf8d47a1f5d8576ea0
2023-07-01 18:33:26 +00:00
drh
17c20bb15e
Improved rounding policy.
...
FossilOrigin-Name: 6f1122e942b8269552daaf13d647d200d8546ec25f36310d67037c6b58d09976
2023-07-01 17:56:00 +00:00
drh
9ee9444a0a
Improved response to Infinity and NaN. Remove the termporary fpdecode()
...
function.
FossilOrigin-Name: 76ab8ae809a47a66688e2d50c20dc87ce946d82e9ffebb3adda55c451fad07fc
2023-07-01 15:23:24 +00:00
drh
42d042e602
Progress towards fixing corner-case floating-point formatting issues.
...
FossilOrigin-Name: 1138b8d16edef16d2943d407e289d07d546a14e64c3efa3c94127631e06fafeb
2023-07-01 14:03:50 +00:00
drh
3f073f9ef8
Fix an issue with the "+" attribute in printf().
...
FossilOrigin-Name: bdfd1eb1d7b4c570a53d58789dac0bf55fdaf8eba515d5a0caf2e57e25b51952
2023-06-30 23:42:46 +00:00
drh
aebeabacff
Begin cutting over sqlite3FpDecode() into printf(). The code in this
...
check-in gets a lot right, but there are still some formatting
discrepencies.
FossilOrigin-Name: c134d423e79ba5d3343d7480229822a0c83210f67f12129e0237181f892f97a5
2023-06-30 23:18:44 +00:00
drh
002330dc48
Add decimal rounding to the sqlite3FpDecode() routine.
...
FossilOrigin-Name: 27871140caa833f0bc0962e44356993938e93dcf81c1074382b1560a3e1aeb61
2023-06-30 19:41:57 +00:00
drh
a1b0ff1735
Experiments with a new algorithm for converting ieee-754 binary64 numbers
...
into decimal.
FossilOrigin-Name: e923405e448385085224f9289991b303d86b02763535ea77d6fcee98ba6fc1f2
2023-06-30 18:35:43 +00:00
dan
24b368da8d
Add support for sqlite3_stmt_scanstatus_v2() profiling of GROUP BY clauses that use a temp b-tree, and for sub-queries implemented as co-routines.
...
FossilOrigin-Name: 7afad1f759f7ceda873c6d869422fd56fe4399c2d24d47ad9bc3b84b06d830d1
2023-06-30 18:31:37 +00:00
dan
4cd3a59a79
Improve support for sqlite3_stmt_scanstatus_v2() profiling of sub-queries implemented as co-routines.
...
FossilOrigin-Name: 4e8718dc35dbbaf75f17265a88d14acd9750dc75efbadf41377f9c97e732009c
2023-06-30 18:23:53 +00:00
dan
07d76f7b95
Add support for sqlite3_stmt_scanstatus_v2() profiling of GROUP BY clauses that use a temp b-tree.
...
FossilOrigin-Name: 796eadcc50e7ea9ec348b1f7e2d6a5a3de78c675a07f665078309e6d81479e7d
2023-06-30 17:14:36 +00:00