Skip to content

Commit 083932a

Browse files
Fix instance of NaNMath.acos (#71)
1 parent 9330dbd commit 083932a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "McCormick"
22
uuid = "53c679d3-6890-5091-8386-c291e8c8aaa1"
33
authors = ["Matthew Wilhelm <[email protected]>"]
4-
version = "0.13.9"
4+
version = "0.13.10"
55

66
[deps]
77
DiffRules = "b552c78f-8df3-52c6-915a-8e097449b14b"

src/McCormick.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ end
202202
"""
203203
$(TYPEDSIGNATURES)
204204
205-
Takes the concave relaxation gradient 'cc_grad', the convex relaxation gradient
206-
'cv_grad', and the index of the midpoint returned 'id' and outputs the appropriate
205+
Takes the concave relaxation gradient `cc_grad`, the convex relaxation gradient
206+
`cv_grad`, and the index of the midpoint returned `id` and outputs the appropriate
207207
gradient according to McCormick relaxation rules.
208208
"""
209209
function mid_grad(cc_grad::SVector{N,Float64}, cv_grad::SVector{N,Float64}, id::Int64) where N
@@ -218,8 +218,8 @@ end
218218
"""
219219
$(TYPEDSIGNATURES)
220220
221-
Calculates the value of the slope line segment between `(xL, f(xL))` and `(xU, f(xU))`
222-
defaults to evaluating the derivative of the function if the interval is tight.
221+
Calculates the value and the slope of the line segment between `(xL, f(xL))` and `(xU, f(xU))`.
222+
Defaults to evaluating the derivative of the function if the interval is tight.
223223
"""
224224
@inline function dline_seg(f::Function, df::Function, x::Float64, xL::Float64, xU::Float64)
225225
delta = xU - xL
@@ -266,7 +266,7 @@ end
266266
$(TYPEDSIGNATURES)
267267
268268
Refines convex/concave relaxations `cv` and `cc` with associated subgradients
269-
`cv_grad` and `cc_grad` by intersecting them with the interval boudns `xL`
269+
`cv_grad` and `cc_grad` by intersecting them with the interval bounds `xL`
270270
and `xU`.
271271
"""
272272
function cut(xL::Float64, xU::Float64, cv::Float64, cc::Float64,

src/forward_operators/mixed_convexity.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ end
314314
flag && (p = golden_section(xL, 0.0, acos_env, xU, 0.0))
315315
end
316316
(x <= p) && (return NaNMath.acos(x), -1.0/NaNMath.sqrt(1.0-x^2), p)
317-
return dline_seg(acos, acos_deriv, x, p, xU)..., p
317+
return dline_seg(NaNMath.acos, acos_deriv, x, p, xU)..., p
318318
end
319319

320320
@inline asinh_deriv(x::Float64) = 1.0/sqrt(1.0 + x^2)

0 commit comments

Comments
 (0)