Skip to content

Commit

Permalink
Remove comment; add derivative test; add jacobian test for mixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
PerezHz committed Nov 22, 2017
1 parent 06d731f commit 1d2e6e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/mixtures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,8 @@ end
@test p1N p1N
@test p1N q1N

Pv = [rndTN(get_order(), 3), rndTN(get_order(), 3)]
Qv = convert.(Taylor1{TaylorN{Float64}}, Pv)

@test jacobian(Pv) == jacobian(Qv)
end
4 changes: 3 additions & 1 deletion test/onevariable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,15 @@ end
@test evaluate(v, complex(0.0,0.2)) ==
[complex(0.0,sinh(0.2)),complex(cos(0.2),sin(-0.2))]

@test derivative(exp(ta(1.0)), 0) == exp(ta(1.0))
expected_result_approx = Taylor1(convert(Vector{Float64},exp(ta(1.0))[0:10]))
@test derivative(exp(ta(1.0)), 5) expected_result_approx atol=eps() rtol=0.0
expected_result_approx = Taylor1(convert(Vector{Float64},exp(ta(1.0pi))[0:12]),15)
@test derivative(exp(ta(1.0pi)), 3) expected_result_approx atol=eps(16.0) rtol=0.0
expected_result_approx = Taylor1(convert(Vector{Float64},exp(ta(1.0pi))[0:5]),15)
@test derivative(exp(ta(1.0pi)), 10) expected_result_approx atol=eps(64.0) rtol=0.0
# @test isapprox(derivative(10, exp(ta(1.0pi))) , exp(1.0pi) )



@test derivative(exp(ta(1.0)), 5)() == exp(1.0)
@test derivative(exp(ta(1.0pi)), 3)() == exp(1.0pi)
Expand Down

0 comments on commit 1d2e6e0

Please sign in to comment.