Skip to content

Commit

Permalink
test type stability of reli(n,x)
Browse files Browse the repository at this point in the history
  • Loading branch information
Expander committed Oct 5, 2023
1 parent 081224c commit 2a1df98
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/Li.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,13 @@ end
@test isinf(PolyLog.reli(10, BigFloat(Inf)))
@test isnan(PolyLog.li(10, NaN))
@test isinf(PolyLog.li(10, Inf))

# test type stability
for T in (Float16, Float32, Float64, BigFloat)
for n in -10:10
for x in (NaN, Inf, -2, -1, 0, 1, 2, 3)
@test typeof(PolyLog.reli(n, convert(T, x))) == T
end
end
end
end

0 comments on commit 2a1df98

Please sign in to comment.