-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqlite3_column_double is lossy #325
Comments
I wonder if it has to do with this flag, Is there a different flag that needs to be set? |
Not quite related, but I'm not sure if I should open a new issue. This query, SELECT 1.7976931348623157e+308 * 1.7976931348623157e+308 Should return Infinity, -Infinity, and NaN are not valid SQL double values |
I just tried it on my computer :
|
Ah, right. I forgot DB Fiddle returns results as a JSON string, and Inf, NaN, -Inf become |
in order to resolve the long double issue discussed in sql-js#325
Yes. Removing this flag does seem to resolve the issue for me, both in a new test case and in my local build of the GUI. I just proposed a new test case in draft PR #336, fix PR is coming next. |
Running the following statement,
On this,
http://kripken.github.io/sql.js/examples/GUI/
Gives me this result set,
I know it's not supposed to be
Infinity
because of this DB Fiddle,Schema (SQLite v3.30)
Query 1
View on DB Fiddle
This isn't the only example of doubles being lossy for some reason unknown to me.
I've seen cases where I had decimal places being cut off, numbers being rounded up and down, etc.
Is there a workaround for this?
The text was updated successfully, but these errors were encountered: