Skip to content

Commit c5f4c00

Browse files
authored
Fix calculation in trigb.jl for sine terms
1 parent c51e515 commit c5f4c00

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PureJuMP/trigb.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function trigb(args...; n::Int = default_nvar, kwargs...)
2020
Min,
2121
sum(
2222
i *
23-
((1 - cos(x[i])) + ((i == 1) ? sin(0) : sin(x[i - 1])) - ((i == n) ? sin(0) : sin(x[i + 1])))
23+
((1 - cos(x[i])) + ((i == 1) ? sin(0) : sin(x[i - 1])) - ((i == n) ? 0 : sin(x[i + 1])))
2424
for i = 1:n
2525
)
2626
)

0 commit comments

Comments
 (0)