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

Revert dotdot #97

Merged
merged 8 commits into from
Mar 2, 2018
Merged

Revert dotdot #97

merged 8 commits into from
Mar 2, 2018

Conversation

dpsanders
Copy link
Member

  • Change definition of .. back to give tight intervals.
  • Add convert(Interval, s::String)

@codecov-io
Copy link

codecov-io commented Feb 26, 2018

Codecov Report

Merging #97 into master will decrease coverage by 0.01%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
- Coverage   91.95%   91.93%   -0.02%     
==========================================
  Files          21       21              
  Lines         969      967       -2     
==========================================
- Hits          891      889       -2     
  Misses         78       78
Impacted Files Coverage Δ
src/intervals/conversion.jl 76.19% <0%> (+1.19%) ⬆️
src/intervals/intervals.jl 85.29% <100%> (-1.2%) ⬇️
src/parsing.jl 96.96% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b59cc6...e5da6a1. Read the comment docs.

Copy link
Member

@lbenet lbenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's wait for travis....

@@ -122,13 +122,13 @@ include("hyperbolic.jl")

# Syntax for intervals

# a..b = Interval(convert(Interval, a).lo, convert(Interval, b).hi)
a..b = Interval(convert(Interval, a).lo, convert(Interval, b).hi)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, we need interval here.

@coveralls
Copy link

coveralls commented Feb 26, 2018

Coverage Status

Coverage decreased (-0.02%) to 91.934% when pulling e5da6a1 on revert_dotdot into 1b59cc6 on master.

@lbenet
Copy link
Member

lbenet commented Feb 26, 2018

Some tests need revision...

@lbenet
Copy link
Member

lbenet commented Mar 1, 2018

Three tests are failing, related to the mid-point radius notation (using ±). The first two are easily solved by:

    @test parse(Interval{Float64}, "3 ±  4") == Interval(-1, 7)
    @test parse(Interval{Float64}, "0.2 ± 0.1") == @interval(0.1,0.3)

which is intuitively what they should do.

The last one is trickier and I think some changes in the code itself are needed, perhaps here.

In my opinion, ± should behave (for BigFloats) just as @biginterval does, so that test would correspond to

@test parse(Interval{BigFloat}, "0.2 ± 0.1") == @biginterval(0.1,0.3)

Yet, this test also fails, because a (and b) is parsed as a BigFloat. In this case, (a-b)..(a+b) will not contain the true lower bound due to rounding issues.

@dpsanders
Copy link
Member Author

I think the latest changes fix this.

@lbenet
Copy link
Member

lbenet commented Mar 1, 2018

Now, other tests are failing: this one and this one, at least...

@lbenet
Copy link
Member

lbenet commented Mar 2, 2018

Some tests still fail. The failure, as far as I have checked locally, is only related to the display of intervals (i.e., display_tests/display.jl). Hopefully, some lefts-over only...

@lbenet
Copy link
Member

lbenet commented Mar 2, 2018

Locally, everything seems to work fine!

I propose to wait for travis, merge and tag a new version! The question is if it should be a patch or a minor version?

@dpsanders
Copy link
Member Author

Since we changed the meaning of .. I think it should be a minor version.

@lbenet
Copy link
Member

lbenet commented Mar 2, 2018

Excellent!

@dpsanders
Copy link
Member Author

The string parsing code in general needs an overhaul.
This should be done by checking what the basic standard and the full standard require and implementing exactly that.

E.g. they require being able to parse 2/3 inside an interval string. Currently this is done by using Julia's parse, but we should avoid that in the future and do it ourselves.

I have a candidate in mind to do all of this work...

@lbenet
Copy link
Member

lbenet commented Mar 2, 2018

I agree with you. But, let's leave it for another PR! The first require to make JuliaIntervals/IntervalRootFinding.jl#24 work is tag a new release here!

@dpsanders
Copy link
Member Author

Tests are passing on Travis! Though the doc generation seems to be broken... :/

@dpsanders dpsanders merged commit f1a03e0 into master Mar 2, 2018
@lbenet
Copy link
Member

lbenet commented Mar 2, 2018

Thanks a lot!

@dpsanders dpsanders deleted the revert_dotdot branch April 9, 2018 17:47
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

Successfully merging this pull request may close these issues.

4 participants