Skip to content

Commit 00c1725

Browse files
committed
Update
1 parent 1575b39 commit 00c1725

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ repo = "https://github.com/JuliaDiff/TaylorSeries.jl.git"
44
version = "0.17.8"
55

66
[deps]
7-
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
87
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
98
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
109
Requires = "ae029012-a4dd-5104-9daa-d747884805df"

test/manyvariables.jl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,31 @@ end
821821
@test float(TaylorN{Complex{Rational}}) == float(TaylorN{Complex{Float64}})
822822
end
823823

824+
@testset "Test evaluate! method for arrays of TaylorN" begin
825+
x = set_variables("x", order=2, numvars=4)
826+
function radntn!(y)
827+
for k in eachindex(y)
828+
for l in eachindex(y[k])
829+
y[k][l] = randn()
830+
end
831+
end
832+
nothing
833+
end
834+
y = zero(x[1])
835+
radntn!(y)
836+
n = 10
837+
v = [zero(x[1]) for _ in 1:n]
838+
r = [zero(x[1]) for _ in 1:n] # output vector
839+
radntn!.(v)
840+
x1 = randn(4) .+ x
841+
TaylorSeries.zero!.(r)
842+
@time TaylorSeries.evaluate!(v, (x1...,), r)
843+
@time r2 = evaluate.(v, Ref(x1))
844+
@test r == r2
845+
@test iszero(norm(r-r2, Inf))
846+
847+
end
848+
824849
end
825850

826851
@testset "Integrate for several variables" begin

0 commit comments

Comments
 (0)