Skip to content

Commit 6c28ba0

Browse files
adienesKristofferC
authored andcommitted
[NFC] add tests for typemin power of float (#59745)
with backports, as suggested in #57463 (comment). closes #57463 (cherry picked from commit 30c34ef)
1 parent b5bed04 commit 6c28ba0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/math.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,15 @@ end
390390
@test isnan(exp(reinterpret(Float64, 0x7ffbb14880000000)))
391391
end
392392

393+
@testset "issue #57463" begin
394+
for T in (Int16, Int32, Int64, Int128)
395+
@test iszero(1.1^typemin(T))
396+
@test iszero(0.9^typemax(T))
397+
@test isinf(1.1^typemax(T))
398+
@test isinf(0.9^typemin(T))
399+
end
400+
end
401+
393402
@testset "test abstractarray trig functions" begin
394403
TAA = rand(2,2)
395404
TAA = (TAA + TAA')/2.

0 commit comments

Comments
 (0)