JuliaIntervals / IntervalContractors.jl

Interval contractors and inverse (reverse) functions for Julia
Other
10 stars 10 forks source link

fixed bugs towards ITF1788 compliance #49

Closed lucaferranti closed 2 years ago

lucaferranti commented 3 years ago

remaining issues

ieeep1788_rev.itl

pow_rev.itl

lucaferranti commented 2 years ago

@lbenet most ITF1788 tests were failing for reverse functions, this PR fixes most of them. The remaining one are other tedious (rev_pow, there's a whole phd dissertation on how to compute that) or probably difficult (power_rev in some cases returns slightly wider results). I suggest to merge this now and track the remaining issues in an issue for later.

(As I briefly mentioned yesterday, I think going through rev_pow and implement it could be a suitable project for an undergrad with some interest in interval methods)

lucaferranti commented 2 years ago

remaining things to do tracked in #48

lbenet commented 2 years ago

@lucaferranti I'll try to find some space this afternoon to review this PR; today I have a very busy morning...

Aside from that, wouldn't this be better in IntervalAithmetic.jl package, precisely for compliance with the standard? This package at the end relies on IA, so there is no new dependency.

lucaferranti commented 2 years ago

I don't have an opinion about whether the reverse functions should be here or in IA, from a standard compliance it may make more sense to have those in IA. Alternatively, one can sell ValidatedNumerics as "the" package.

One thing that could be nice to do in this package is to define a common contractor interface for both IntervalRootFinding.jl and IntervalConstraintProgramming, e.g. currently both packages export Contractor, which is a little suboptimal. However this can be discussed later I guess.

I think @dpsanders had some reasons to have reverse functions in a separate package?

lucaferranti commented 2 years ago

@lbenet I've updated some docstrings (the three for powers to disambiguate and a few more), if you think the template is good, I can add to the others too (maybe in a separate PR, if the idea was to merge this before the other PR in IntervalArithmetic.jl).

I didn't quite understand your other comment, the power_rev function with one parameter seems to be defined here

lbenet commented 2 years ago

In view of https://github.com/JuliaIntervals/IntervalArithmetic.jl/pull/271, my only suggestion is to add the reference section of the standard where the rev functions are described; I think this is Sect 10.5.4 and Table 10.1. But this can be included in a separated PR.

lucaferranti commented 2 years ago

@lbenet apologies for my delay in coming back to this.

I have now clarified the docstrings for the functions with reference to the standard. Let me know if you want me to do other changes, otherwise once this is merged I can update https://github.com/JuliaIntervals/IntervalArithmetic.jl/pull/505

lbenet commented 2 years ago

Please, go ahead and merge this!