From: drh <> Date: Thu, 29 Jun 2023 16:48:25 +0000 (+0000) Subject: Change the (undocumented) dtostr() SQL function in the CLI so that it only X-Git-Tag: version-3.43.0~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd88a74115626bfe6403a08b33cdcb67854bcc07;p=thirdparty%2Fsqlite.git Change the (undocumented) dtostr() SQL function in the CLI so that it only shows the first 26 significant digits - 10 more digits than are available in a 64-bit double. FossilOrigin-Name: d758859f6ab94ddb9b3ee6f6f5f24b16e2b7a7712761080cfc6540d68b5a0c97 --- diff --git a/manifest b/manifest index 2e7d2c8bc9..9f0e3dfb07 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\sdecimal_sci(X)\sfunction\sto\sthe\sDecimal\sextension\sfor\sshowing\sa\sdecimal\nvalue\sin\sscientific\snotation:\s\s+D.DDDDDe+DD -D 2023-06-29T14:49:23.326 +C Change\sthe\s(undocumented)\sdtostr()\sSQL\sfunction\sin\sthe\sCLI\sso\sthat\sit\sonly\nshows\sthe\sfirst\s26\ssignificant\sdigits\s-\s10\smore\sdigits\sthan\sare\savailable\nin\sa\s64-bit\sdouble. +D 2023-06-29T16:48:25.462 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -638,7 +638,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c F src/resolve.c 37953a5f36c60bea413c3c04efcd433b6177009f508ef2ace0494728912fe2e9 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c 383b9dba12493c365ee2036bcadd73013b7c0f7d2afcda0c378317c335d60ac2 -F src/shell.c.in 10e9f46b1a9c335ba8fdb31f449ca562ac69c7edc667bd5483aba7a399d0ff51 +F src/shell.c.in 8b5b1b4b47d60b3efa13a3c4ff0769228c6427cb27d3d10de1cc814ced078861 F src/sqlite.h.in 3076d78836b6dac53b3ab0875fc8fd15bca8077aad4d33c85336e05af6aef8c7 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h da473ce2b3d0ae407a6300c4a164589b9a6bfdbec9462688a8593ff16f3bb6e4 @@ -2041,8 +2041,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 669996a8ddcbf35f3de66cf466508fc1e6dd09ab269aba395ac86a11b2ec238c -R 090cbc96cc5b169f2dbe66c47db5bae8 +P 61d4923913e88b980ce93db4f3f9f9d7ba3baaac724995c36c9b887c034accdc +R 983575d0194b3a14d01efc5f1f8181d6 U drh -Z d52f599d2e14938fb14fb03c95733f3a +Z 4fcd0225dec5f74728c5f2d47e52e14a # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index de3d836cec..9f9ca72c0b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -61d4923913e88b980ce93db4f3f9f9d7ba3baaac724995c36c9b887c034accdc \ No newline at end of file +d758859f6ab94ddb9b3ee6f6f5f24b16e2b7a7712761080cfc6540d68b5a0c97 \ No newline at end of file diff --git a/src/shell.c.in b/src/shell.c.in index 9bad1232e9..5bda7c9cdf 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -1238,7 +1238,7 @@ static void shellDtostr( ){ double r = sqlite3_value_double(apVal[0]); char z[200]; - sprintf(z, "%#+.70e", r); + sprintf(z, "%#+.26e", r); sqlite3_result_text(pCtx, z, -1, SQLITE_TRANSIENT); }