Skip to content

Commit 5d593d9

Browse files
committed
1 parent 95d5de5 commit 5d593d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DiffTests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ end
8989
rosenbrock_3(x) = sum(map((i, j) -> (1 - j)^2 + 100*(i - j^2)^2, x[2:end], x[1:end-1]))
9090

9191
function rosenbrock_4(x)
92-
t1 = (1 + x[1:end-1]).^2
93-
t2 = x[2:end] + (x[1:end-1]).^2
94-
return sum(t1 + 100 * (abs.(t2)).^2)
92+
t1 = (1 .+ x[1:end-1]).^2
93+
t2 = x[2:end] .+ (x[1:end-1]).^2
94+
return sum(t1 .+ 100 .* (abs.(t2)).^2)
9595
end
9696

9797
function ackley(x)

0 commit comments

Comments
 (0)