-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
parse(Float64,::String) doesn't respect rounding mode #13481
Comments
I'm not really familiar with the package: can you provide some specific examples of the incorrect behaviour? |
I'll try and reduce to some minimal cases. cc @lbenet |
Are you calling libm functions? I seem to recall that those may modify the rounding mode on some systems, or give incorrect answers if the rounding mode is changed. |
We should just be doing rounding mode changes like
|
with your example using rc4 on Win7, a==b==0.1 with your example using rc2 on Linux (same box), a!=b, b==0.1, a=b-eps(b) |
and using rc4 on same Linux also worked correctly |
From what I understand, we use the system |
The expected results for the tests (which fail in travis!) correspond to your results in Linux; we get exactly the same in our Macs and also in linux with Julia Version 0.4.0-rc4+4, Commit 7048c40* (2015-10-07 00:33 UTC). The system is Linux (x86_64-suse-linux) As for Simon's question, on that linux machine we have: Do you know this info for travis? |
GNU C Library (Ubuntu EGLIBC 2.19-0ubuntu6.6) stable release version 2.19, |
This looks like it might have been fixed in glibc 2.17: From what I can tell, travis is running eglibc 2.15, so that would explain it. I don't know if there is any way to update it via apt (though I would suspect not, since it is so tightly linked to the OS). At some point in future I think we should try to implement our own version, this would also fix our issues with MSVC (#6349). |
@tkelman Is it possible to upgrade travis to incorporate some bug fixes in glibc? |
They may have an opt-in way to use ubuntu 14.04 by now, not sure. If it is only available via a docker worker then we would have to replace all the apt-get steps in our travis setup. |
If you're asking about a package, then try putting the following in your yml:
Actually reading http://blog.travis-ci.com/2015-08-19-using-docker-on-travis-ci/, it looks like we could maybe transition our main Linux Travis setup to caching things via docker. |
…NEWS.md The modification to travis follows the suggestion by @tkelman JuliaLang/julia#13481 (comment)
The problem is indeed related with our package (see JuliaIntervals/ValidatedNumerics.jl#56); while tests pass locally (in Linux and Mac), they fail in travis. I followed your suggestion and finally the tests pass also in travis! Thanks a lot !!! |
These seems to be fixed. |
In
https://travis-ci.org/dpsanders/ValidatedNumerics.jl/builds/84036519
the tests for the
ValidatedNumerics.jl
package, which include lots of rounding mode changes,run correctly on Mac OS, but give some incorrect results on Linux.
Could this be due to extended precision mode? How can this be turned off?
Or is there another explanation?
Cc @simonbyrne
The text was updated successfully, but these errors were encountered: