Skip to content

Commit

Permalink
fix tests on 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aplavin committed Apr 25, 2024
1 parent 1616c48 commit 371ec13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test_inverse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,17 @@ end
end
for f in (
+, -, exp, exp2, exp10, expm1, cbrt, deg2rad, rad2deg, conj,
sinh, tanh, coth, csch, asinh, atanh, acoth Base.Fix1(+, 2), acsch, # all invertible hyperbolic functions; acoth is only defined for |x| > 1
sinh, tanh, coth, csch, asinh, atanh, acsch, # all invertible hyperbolic functions aside from acoth
Base.Fix1(+, rand()), Base.Fix2(+, rand()), Base.Fix1(-, rand()), Base.Fix2(-, rand()),
Base.Fix1(*, rand()), Base.Fix2(*, rand()), Base.Fix1(/, rand()), Base.Fix2(/, rand()), Base.Fix1(\, rand()), Base.Fix2(\, rand()),
Base.Fix2(^, rand(-11:2:11)),
)
InverseFunctions.test_inverse(f, x)
InverseFunctions.test_inverse(f, -x)
end
# acoth only defined for |x| > 1
InverseFunctions.test_inverse(acoth, 1 + x)
InverseFunctions.test_inverse(acoth, -1 - x)

InverseFunctions.test_inverse(conj, 2 - 3im)
InverseFunctions.test_inverse(reverse, [10, 20, 30])
Expand Down

0 comments on commit 371ec13

Please sign in to comment.