-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add decorations for reverse functions #43
Conversation
ITF1788 Tests
Branch
|
ITF1788 Test Master
Branch
|
src/decorations.jl
Outdated
|
||
for f in reverse_functions | ||
@eval function $(f)(xx::DecoratedInterval, yy::DecoratedInterval) | ||
x = interval_part(xx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use interval(xx)
instead of interval_part
.
This should be changed in IntervalArithmetic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will make a PR in IntervalArithmetic.jl addressing this
end | ||
end | ||
|
||
function mul_rev_IEEE1788(xx::DecoratedInterval, yy::DecoratedInterval) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this just be included in the previous piece of code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we will need a separate tuple especially for mul_rev_IEEE1788
because this function is not accepting single intervals as input like other functions in the tuple reverse_functions
.
@@ -27,12 +27,12 @@ end | |||
@testset "cosh_rev_test" begin | |||
@test isapprox(cosh_rev(∅, -∞..∞)[2], ∅) | |||
@test isapprox(cosh_rev(Interval(-10.0, -1.0), -∞..∞)[2], ∅) | |||
@test isapprox(cosh_rev(Interval(0.0, Inf), -∞..∞)[2], Interval(0.0, ∞)) | |||
@test isapprox(cosh_rev(Interval(0.0, Inf), -∞..∞)[2], Interval(-∞, ∞)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is isapprox
being used here? We should be testing equality I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests were not added by me, I have only edited them to return negative values as well.
Should I replace isapprox
too?
supesed by #49 |
No description provided.