Skip to content

Commit 2bfaba3

Browse files
facusapienza21tansongchen
authored andcommitted
Add trivial tests for binary operations involving two TaylorScalar
1 parent 3827867 commit 2bfaba3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/primitive.jl

+6
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ end
5050
# end
5151
end
5252

53+
@testset "Multi-argument functions" begin
54+
@test derivative(x -> 1 + 1/x, 1.0, Val(1))-1.0 rtol=1e-6
55+
@test derivative(x -> (x+1)/x, 1.0, Val(1))-1.0 rtol=1e-6
56+
@test derivative(x -> x/x, 1.0, Val(1)) 0.0 rtol=1e-6
57+
end
58+
5359
@testset "Corner cases" begin
5460
offenders = (
5561
TaylorScalar(Inf, (1.0, 0.0, 0.0)),

0 commit comments

Comments
 (0)