-
-
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
More stringent range testing #48465
More stringent range testing #48465
Conversation
Turns a test_skip into a test. This may have been passing since PR#23194 but never made a requirement. This change removes the single largest contribution to "total broken tests" in the whole test suite.
|
Yeah, there seem to be a few edge cases left. Would could allow a small failure rate, or just close this. Thoughts? |
Why is it failing only on some platforms? Is it not deterministic? |
An example case I found: julia> (start, delta, stop) = -2.8345144f0, 0.9447948f0, -0.00012993813f0
(-2.8345144f0, 0.9447948f0, -0.00012993813f0)
julia> r = start:delta:stop
-2.8345144f0:0.9447948f0:-0.00013005733f0
julia> last(r) ≈ stop
false The problem here is that julia> start + 3*delta # intermediate values in Float32
-0.00012993813f0
julia> Float32(Float64(start) + 3*Float64(delta)) # intermediate values in higher precision
-0.00013005733f0 This particular case uses the fallback branch, since the rational part fails: julia> num, den = Base.rat(delta)
(599, 634)
julia> Float32(num/den)
0.94479495f0 The question here is what criteria we should use for determining The fix for now is to adjust the tolerance. |
Co-authored-by: Ian Butterworth <[email protected]>
LGTM, thanks @simonbyrne |
Seen on CI:
|
Follow up on #48465. Addresses CI failure noted here #48465 (comment).
* Fix bounds on floating point range testing Follow up on #48465. Addresses CI failure noted here #48465 (comment). * Use simpler error bound
Turns a
@test_skip
into a@test
. This may have been passing since #23194 but was never turned into a requirement. This change removes the single largest contribution to "total broken tests" in the whole test suite.