Skip to content
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

Round from zero support for non-BigFloats #41246

Merged
merged 14 commits into from
Apr 12, 2022
Prev Previous commit
Next Next commit
note broken BigFloat case
  • Loading branch information
stevengj authored Apr 7, 2022
commit 8e55cc9a196d8cea88c6134ff2471e3431348d1f
2 changes: 1 addition & 1 deletion test/numbers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2540,7 +2540,7 @@ end
@test isnan(rem(T(Inf), T(2), mode))
@test isnan(rem(T(1), T(NaN), mode))
# FIXME: The broken case erroneously returns -Inf
@test rem(T(4), floatmin(T) * 2, mode) == 0 broken=(T == BigFloat && mode == RoundUp)
@test rem(T(4), floatmin(T) * 2, mode) == 0 broken=(T == BigFloat && mode in (RoundUp,RoundFromZero))
end
@test isequal(rem(nextfloat(typemin(T)), T(2), RoundToZero), -0.0)
@test isequal(rem(nextfloat(typemin(T)), T(2), RoundNearest), -0.0)
Expand Down