Skip to content
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

Fails with version 0.16.3 of IntervalArithmetic #39

Closed
mewilhel opened this issue Jan 23, 2020 · 2 comments
Closed

Fails with version 0.16.3 of IntervalArithmetic #39

mewilhel opened this issue Jan 23, 2020 · 2 comments

Comments

@mewilhel
Copy link
Contributor

The pi_interval is no longer exported in IntervalArithmetic 0.16.3. So in trig.jl line 59 and 128, IntervalArithmetic.pi_interval(Float64) needs to be swapped for Interval{Float64}(π) or an upper bound of 0.16.2 needs to be added to the project.toml.

function cos_main(X::IntervalBox)

    x, y = X

    x_range = Interval(0, IntervalArithmetic.pi_interval(Float64).lo)
    y_range = -1..1

    x = x  x_range
    y = y  y_range

    isempty(IntervalBox(x, y)) && return IntervalBox(x, y)

    y = y  cos(x)
    x = x  acos(y)

    return IntervalBox(x, y)

end
tan!(X::IntervalBox) = periodise(tan_main, IntervalArithmetic.pi_interval(Float64))(X)
@dpsanders
Copy link
Member

Sorry I only just saw this for some reason.
Thanks for the report. Would you mind making a PR for this?

@mewilhel
Copy link
Contributor Author

mewilhel commented Apr 2, 2020

Gladly! #42

dpsanders pushed a commit that referenced this issue Apr 3, 2020
* Remove pi_interval from trig.jl

* Fix expm1 tests

Incorrect tests (script not broken).

* Bump Patch Number

* Bump IntervalArithmetic requirement to 0.16.3 or greater
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants