Skip to content

Commit

Permalink
test log1pexp with multiple precisions
Browse files Browse the repository at this point in the history
  • Loading branch information
cossio committed Mar 9, 2022
1 parent 5b8f686 commit 7e6cfd0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/basicfuns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ end
@testset "log1pexp($x::$T)" for T in (Float16, Float32, Float64, BigFloat), x in -300:300
@test (@inferred log1pexp(T(x))) T(correct_log1pexp(big(x)))
end

# test BigFloat with multiple precisions
@testset "log1pexp($x) prec=$prec" for prec in (10, 20, 50, 100), x in -300:300
expected = correct_log1pexp(big(x))
setprecision(prec) do
actual = @inferred log1pexp(big(float(x)))
@test actual expected
end
end
end

@testset "log1mexp" begin
Expand Down

0 comments on commit 7e6cfd0

Please sign in to comment.