Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jrevels committed Sep 15, 2017
1 parent 95d5de5 commit 5d593d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DiffTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ end
rosenbrock_3(x) = sum(map((i, j) -> (1 - j)^2 + 100*(i - j^2)^2, x[2:end], x[1:end-1]))

function rosenbrock_4(x)
t1 = (1 + x[1:end-1]).^2
t2 = x[2:end] + (x[1:end-1]).^2
return sum(t1 + 100 * (abs.(t2)).^2)
t1 = (1 .+ x[1:end-1]).^2
t2 = x[2:end] .+ (x[1:end-1]).^2
return sum(t1 .+ 100 .* (abs.(t2)).^2)
end

function ackley(x)
Expand Down

0 comments on commit 5d593d9

Please sign in to comment.