Skip to content

Commit

Permalink
Add more single-variable versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dpsanders committed Jul 22, 2024
1 parent 4a23e1c commit 932a977
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/hyperbolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The pair `(c, x_new)` where
- `c` is unchanged
- `x_new` is the interval hull of the set ``{x ∈ b : sinh(x) ∈ a}``
"""
function sinh_rev(y::Interval, x::Interval)
function sinh_rev(y::Interval, x::Interval = entireinterval(y)
x = x asinh(y)

return y, x
Expand All @@ -30,7 +30,7 @@ The pair `(c, x_new)` where
- `c` is unchanged
- `x_new` is the interval hull of the set ``{x ∈ b : cosh(x) ∈ a}``
"""
function cosh_rev(y::Interval,x::Interval)
function cosh_rev(y::Interval, x::Interval = entireinterval(y))
y_new = y interval(1.,∞)
x = (x acosh(y)) (x -acosh(y))

Expand All @@ -50,7 +50,7 @@ The pair `(c, x_new)` where
- `c` is unchanged
- `x_new` is the interval hull of the set ``{x ∈ b : tanh(x) ∈ a}``
"""
function tanh_rev(y::Interval,x::Interval)
function tanh_rev(y::Interval, x::Interval = entireinterval(y))
y_new = y interval(-1.,1.)
x = x atanh(y)

Expand Down
4 changes: 2 additions & 2 deletions src/trig.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function tan_main(X::IntervalBox)

end

tan!(X::IntervalBox) = periodise(tan_main, Interval{Float64}(π))(X)
tan!(X::IntervalBox) = periodise(tan_main, interval(π))(X)

"""
tan_rev(c::Interval[, x::Interval])
Expand All @@ -154,7 +154,7 @@ The pair `(c, x_new)` where
- `c` is unchanged
- `x_new` is the interval hull of the set ``{x ∈ b : tan(x) ∈ a}``
"""
function tan_rev(y::Interval, x::Interval)
function tan_rev(y::Interval, x::Interval = entireinterval(y))

X = IntervalBox(x, y)

Expand Down

0 comments on commit 932a977

Please sign in to comment.