Skip to content

Commit

Permalink
Add tests for logs of subnormals
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt committed Feb 6, 2021
1 parent 7d34b0d commit fbbabdd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,13 @@ end
@test isnan_type(T, log1p(T(NaN)))
@test_throws DomainError log1p(-2*one(T))
end
@testset "log of subnormals" begin
# checked results with WolframAlpha
for (T, ex, res) in ((Float32, -128, -88.72284f0),
(Float64, -1024, -709.782712893384))
@test log(T(2)^ex) res
end
end
end

@testset "vectorization of 2-arg functions" begin
Expand Down

0 comments on commit fbbabdd

Please sign in to comment.