Skip to content

Commit

Permalink
Add test of f(Z) for functions f of complex intervals Z (#240)
Browse files Browse the repository at this point in the history
* Add test of sin(Z) for complex interval Z

* Add a test of e^(i*pi)
  • Loading branch information
dpsanders authored Mar 6, 2017
1 parent dc436bc commit b215e4b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/interval_tests/complex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@ using ValidatedNumerics
@test a / a == 1
@test a^2 == -1
end

@testset "Complex functions" begin
Z = (3 ± 1e-7) + (4 ± 1e-7)*im
@test sin(Z) == Interval(3.853734949309744, 3.8537411265295507) - Interval(27.016810169394066, 27.016816346613883)*im

@test exp(-im * Interval(π)) == Interval(-1.0, -0.9999999999999999) - Interval(1.224646799147353e-16, 1.2246467991473532e-16)*im
end

0 comments on commit b215e4b

Please # to comment.