mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Round-trip conversions of real->text->real are now lossless on x64 with GCC.
Untested on other platforms so far. Still a corner-case problem with round(). FossilOrigin-Name: fd7bd4a59361be41b10522abc212cf56fb5e35b4
This commit is contained in:
@@ -430,6 +430,7 @@ void sqlite3VXPrintf(
|
||||
}
|
||||
if( realvalue>0.0 ){
|
||||
LONGDOUBLE_TYPE scale = 1.0;
|
||||
while( realvalue>=1e100*scale && exp<=350 ){ scale *= 1e100;exp+=100;}
|
||||
while( realvalue>=1e64*scale && exp<=350 ){ scale *= 1e64; exp+=64; }
|
||||
while( realvalue>=1e8*scale && exp<=350 ){ scale *= 1e8; exp+=8; }
|
||||
while( realvalue>=10.0*scale && exp<=350 ){ scale *= 10.0; exp++; }
|
||||
|
||||
Reference in New Issue
Block a user