"The database file format is cross-platform - you can freely copy a database 
between 32-bit and 64-bit systems or between big-endian and little-endian 
architectures.

Quote:
"In your machine, implementation, and SQLite installation the
two value representations may be identical, while in others it may not be."

Does it mean the promise about cross-platform is broken?
________________________________
发件人: Bernardo Sulzbach<mailto:[email protected]>
发送时间: ‎2016/‎10/‎17 17:19
收件人: 
[email protected]<mailto:[email protected]>
主题: Re: [sqlite] A possible double bug?

On 10/17/2016 07:12 AM, Quan Yong Zhai wrote:
> I can’t reproduce the problem,

As it has already been pointed out, this is normal for floating point
arithmetic. In your machine, implementation, and SQLite installation the
two value representations may be identical, while in others it may not be.

fabs(a - b) is the simplest way to have an idea of how close two values
are, and dividing by the magnitude of one of them (after checking that
it is not zero, etc.) afterwards is also a good idea in some cases.

--
Bernardo Sulzbach
http://www.mafagafogigante.org/
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to