Skip to content

Commit 30c34ef

Browse files
authored
[NFC] add tests for typemin power of float (#59745)
with backports, as suggested in #57463 (comment). closes #57463
1 parent 3b1fa7c commit 30c34ef

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
@@ -442,6 +442,15 @@ end
442442
@test isnan(exp(reinterpret(Float64, 0x7ffbb14880000000)))
443443
end
444444

445+
@testset "issue #57463" begin
446+
for T in (Int16, Int32, Int64, Int128)
447+
@test iszero(1.1^typemin(T))
448+
@test iszero(0.9^typemax(T))
449+
@test isinf(1.1^typemax(T))
450+
@test isinf(0.9^typemin(T))
451+
end
452+
end
453+
445454
@testset "test abstractarray trig functions" begin
446455
TAA = rand(2,2)
447456
TAA = (TAA + TAA')/2.

0 commit comments

Comments
 (0)