Skip to content

Commit

Permalink
Add tests for rem2pi for NaN values
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautam98 committed Jun 24, 2020
1 parent 698944e commit d9dbec7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/numbers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2509,6 +2509,13 @@ end
@test rem2pi(T(-4), RoundUp) == -4
end

@testset "PR #36420 $T" for T in (Float16, Float32, Float64)
@test rem2pi(T(NaN), RoundToZero) === T(NaN)
@test rem2pi(T(NaN), RoundNearest) === T(NaN)
@test rem2pi(T(NaN), RoundDown) === T(NaN)
@test rem2pi(T(NaN), RoundUp) === T(NaN)
end

import Base.^
struct PR20530; end
struct PR20889; x; end
Expand Down

0 comments on commit d9dbec7

Please sign in to comment.