Skip to content

Commit 7bc47cc

Browse files
committed
add test
1 parent 59010a3 commit 7bc47cc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/concrete_accuracy.jl

+13
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,16 @@
4646
@test typeof(rand(Double32)) == Double32
4747
@test typeof(rand(Double16)) == Double16
4848
end
49+
50+
@testset "Subnormal numbers" begin
51+
for (F, D) in (
52+
(Float64, Double64),
53+
(Float32, Double32),
54+
(Float16, Double16),
55+
)
56+
sn = D(prevfloat(floatmin(F)))
57+
58+
@test sqrt(F(sn)) == F(sqrt(D(sn)))
59+
@test cbrt(F(sn)) == F(cbrt(D(sn)))
60+
end
61+
end

0 commit comments

Comments
 (0)