1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Improved rounding accuracy on test-to-float conversions.

FossilOrigin-Name: 699b792c6a0e989994549959b11ec1bfad8bbd92
This commit is contained in:
drh
2012-06-19 00:45:16 +00:00
parent 2ae26b759d
commit 89f15088f0
5 changed files with 85 additions and 10 deletions

View File

@@ -371,7 +371,7 @@ do_atof_calc:
/* if exponent, scale significand as appropriate
** and store in result. */
if( e ){
double scale = 1.0;
LONGDOUBLE_TYPE scale = 1.0;
/* attempt to handle extremely small/large numbers better */
if( e>307 && e<342 ){
while( e%308 ) { scale *= 1.0e+1; e -= 1; }