We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d91124 commit 29004dfCopy full SHA for 29004df
1 file changed
test/StdTest.jl
@@ -345,6 +345,10 @@ end
345
@test to_std_string(gradient(sum(x), x)) == "vec(1)"
346
@test to_std_string(gradient(2 * sum(x), x)) == "2vec(1)"
347
@test to_std_string(gradient(sum(2 * x), x)) == "2vec(1)"
348
+ @test to_std_string(gradient(2 * sum(sin(x)), x)) == "2cos(x)"
349
+ @test to_std_string(gradient(sum(2 * sin(x)), x)) == "2cos(x)"
350
+ @test to_std_string(gradient(2 * sum(cos(A * x + y)), x)) == "2(-1)Aᵀsin(Ax + y)"
351
+ @test to_std_string(gradient(sum(2 * cos(A * x + y)), x)) == "2(-1)Aᵀsin(Ax + y)"
352
@test to_std_string(gradient(sum(x .^ 2), x)) == "2x"
353
@test to_std_string(gradient(sum(x .^ 3), x)) == "3x²"
354
@test to_std_string(gradient(sum((x + y) .^ 2), x)) == "2(x + y)"
0 commit comments