]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Improved comments on the hasHighPrecisionDouble() routine. No changes to runtime-longdouble-test
authordrh <>
Wed, 13 Sep 2023 20:35:04 +0000 (20:35 +0000)
committerdrh <>
Wed, 13 Sep 2023 20:35:04 +0000 (20:35 +0000)
the underlying code.

FossilOrigin-Name: 810c635ce063d873e969bf83339c654f6008e84ce8a61f0ffc61806e98d13dde

manifest
manifest.uuid
src/main.c

index 05f0ad474e2f4341a43b84a9355b427f0bdec787..806405336effdabebcb2c30d3cc29a04555793c0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Determine\sat\sstart\stime\swhether\sor\snot\sthe\sunderlying\shardware\ssupports\nhigh-precision\slong\sdouble\scomputations.
-D 2023-09-13T20:06:46.382
+C Improved\scomments\son\sthe\shasHighPrecisionDouble()\sroutine.\s\sNo\schanges\sto\nthe\sunderlying\scode.
+D 2023-09-13T20:35:04.920
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -672,7 +672,7 @@ F src/insert.c 3f0a94082d978bbdd33c38fefea15346c6c6bffb70bc645a71dc0f1f87dd3276
 F src/json.c 51141f1c09ccb177057e5813e6302a5e32e5ba88cc4a756318a35081010fc6df
 F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
 F src/loadext.c 98cfba10989b3da6f1807ad42444017742db7f100a54f1032af7a8b1295912c0
-F src/main.c d3489e9c6bb2953c341a1d21905e938cc637cf3eda3d45763c8783ad3e8a5df8
+F src/main.c 618aeb399e993cf561864f4b0cf6a331ee4f355cf663635f8d9da3193a46aa40
 F src/malloc.c 47b82c5daad557d9b963e3873e99c22570fb470719082c6658bf64e3012f7d23
 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
 F src/mem1.c 3bb59158c38e05f6270e761a9f435bf19827a264c13d1631c58b84bdc96d73b2
@@ -2120,11 +2120,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 9ea0a9f39d03707d251af5af08d1ba94958704ba74019d7e8823ccd21936023c
-R 9d032fc0954884df48b056f822f415bb
-T *branch * runtime-longdouble-test
-T *sym-runtime-longdouble-test *
-T -sym-trunk *
+P 9a854b919667e0e679a259542b2ee444ee416dbd73ecd9458f6ced35d9d3f264
+R 2cf5225da68e808b8d6be96ec87494aa
 U drh
-Z 4050589208bc39d1cdb1d56c5679577d
+Z 7ae23f2f1935a56e3223edbdedc613fe
 # Remove this line to create a well-formed Fossil manifest.
index 8466fcf0c1e1263da8d223e627276099883e87a2..5b62515d2a0cf7719a8592ddf9abec0ba2718f32 100644 (file)
@@ -1 +1 @@
-9a854b919667e0e679a259542b2ee444ee416dbd73ecd9458f6ced35d9d3f264
\ No newline at end of file
+810c635ce063d873e969bf83339c654f6008e84ce8a61f0ffc61806e98d13dde
\ No newline at end of file
index 59f90197fa6b26804d849f41e90f1127d5022058..a43afab1686ccef1c2d6f963a2de1549d624cddc 100644 (file)
@@ -160,15 +160,21 @@ char *sqlite3_temp_directory = 0;
 char *sqlite3_data_directory = 0;
 
 /*
-** Determine what the default bUseLongDouble value should be and set it.
+** Determine whether or not high-precision (long double) floating point
+** math works correctly on CPU currently running.
 */
 static SQLITE_NOINLINE int hasHighPrecisionDouble(int rc){
   if( sizeof(LONGDOUBLE_TYPE)<=8 ){
+    /* If the size of "long double" is not more than 8, then
+    ** high-precision math is not possible. */
     return 0;
   }else{
     /* Just because sizeof(long double)>8 does not mean that the underlying
-    ** hardware actually supports high-precision floating point.  Do a test
-    ** to verify that it really does */
+    ** hardware actually supports high-precision floating point.  For example,
+    ** clearing the 0x100 bit in the floating-point control word on Intel
+    ** processors will make long double work like double, even though long
+    ** double takes up more space.  The only way to determine if long double
+    ** actually works is to run an experiment. */
     LONGDOUBLE_TYPE a, b, c;
     rc++;
     a = 1.0+rc*0.1;