Improve the range of floating-point numbers that can be handled as integers

for numeric-to-text conversion.

FossilOrigin-Name: 41580ba452fdbc3f73da60d8030289d38614c4cab8d24140d7cc44a54b2da8d2
This commit is contained in:
drh 2023-06-29 17:36:18 +00:00
parent a75011a891
commit 0b1a1e8c37
3 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C Further\srefine\sthe\sdtostr()\stesting\sfunction\sin\sthe\sCLI\sso\sthat\sit\stakes\san\noptional\ssecond\sparameter\swhich\sis\sthe\snumber\sof\ssignificant\sdigits\sto\sdisplay.
D 2023-06-29T17:26:21.732
C Improve\sthe\srange\sof\sfloating-point\snumbers\sthat\scan\sbe\shandled\sas\sintegers\nfor\snumeric-to-text\sconversion.
D 2023-06-29T17:36:18.544
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -633,7 +633,7 @@ F src/pcache1.c 602acb23c471bb8d557a6f0083cc2be641d6cafcafa19e481eba7ef4c9ca0f00
F src/pragma.c 37b8fb02d090262280c86e1e2654bf59d8dbfbfe8dc6733f2b968a11374c095a
F src/pragma.h e690a356c18e98414d2e870ea791c1be1545a714ba623719deb63f7f226d8bb7
F src/prepare.c d6c4354f8ea0dc06962fbabc4b68c4471a45276a2918c929be00f9f537f69eb1
F src/printf.c cb8357e7810848a2148acacfa8897c84905cadc3b040c2e7e0d2b000a3bcef82
F src/printf.c a87473be34fa2acafa27692b8ae078275c7e23360956c93c07ff22f5d609cbd7
F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c 37953a5f36c60bea413c3c04efcd433b6177009f508ef2ace0494728912fe2e9
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
@ -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 d758859f6ab94ddb9b3ee6f6f5f24b16e2b7a7712761080cfc6540d68b5a0c97
R a4c45eeed81feef61bc930db9802b9d0
P 2f9d4444aa503102a00d6e6769dadc57d4b26a2c07f145f23f2f28e0c161246d
R 18539dbd8d738cca0553ea689964a747
U drh
Z 04c984163e7286ef19d8dbc870dfbf03
Z 2608fc041c5b7ba12c70edc8bfa01f60
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
2f9d4444aa503102a00d6e6769dadc57d4b26a2c07f145f23f2f28e0c161246d
41580ba452fdbc3f73da60d8030289d38614c4cab8d24140d7cc44a54b2da8d2

View File

@ -559,7 +559,7 @@ void sqlite3_str_vappendf(
exp = 0;
if( xtype==etGENERIC && precision>0 ) precision--;
testcase( precision>0xfff );
if( realvalue<1.0e+16
if( realvalue<9.22e+18
&& realvalue==(LONGDOUBLE_TYPE)(longvalue = (u64)realvalue)
){
/* Number is a pure integer that can be represented as u64 */