-
Notifications
You must be signed in to change notification settings - Fork 17
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
Adds functions to calculate the midpoint_radius representation. #35
Conversation
58d9fef
to
9471568
Compare
Well let's just leave it as |
Added inverse trig functions Added tests for inverse trig functions Added floor and ceil for intervals Added tests for asin and acos when interval is not in domain. Added inverse trig functions in automatic_differentiation (need tests) Remove Float from newton tests due to Travis Added midpoint_radius Removed clean_roots and its necessity; added find_roots_midpoint Added with_interval_precision Restore sort! for roots in newton and krawczyk Generate Wilkinson polynomials using Horner's method Minor changes Added possibility to have array references of form a[i] inside @interval Rewrite symbol generation for W3 since previous version only worked on Julia v0.4 Separate out Wilkinson polynomials into separate file. Use lexicographic ordering for sorting roots Reduced some keyword argument complexity in Newton and Krawczyk Make code slightly more readable Changed Root to be a true immutable type. Fixes for various versions of newton, find_roots etc. Tests pass Periodic points notebook
ee5889b
to
7ed956a
Compare
Squashed. Ready to merge I think. |
@dpsanders I really like lots of the changes and additions. One suggestion: Change the output of julia> @interval 0.1
[0.09999999999999999, 0.1]
julia> midpoint_radius(ans)
(0.1,1.3877787807814457e-17) I think it looks nicer that the output of the last line is something like:
|
Along the same lines: julia> set_interval_precision(BigFloat, 53)
53
julia> @interval 0.1
[9.9999999999999992e-02, 1.0000000000000001e-01]₅₃
julia> midpoint_radius(ans)
(1.0000000000000001e-01,1.3877787807814457e-17) The last line doesn't show that it is a BigFloat interval of 53 bits of precision... |
@@ -1,39 +1,127 @@ | |||
|
|||
# immutable Root{T<:Real} |
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 really like the idea; have you benchmark it against previous behavior? I would guess it is much faster now, isn't it?
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.
This was meant on line 14...
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 haven't benchmarked it. The change was necessary to have more readable code (and results). I expect it doesn't change the speed too much (at least on v0.4).
I'll wait for your reply about my comment. I agree it is ready to be merged. |
Your two comments about the display are good ones, but not relevant for this PR:
The function I have opened issue #39 for this, but I think we can leave this til after 0.1.
(1.0000000000000001e-01 with 53 bits of precision,5.551115123125783e-18 with 53 bits of precision) We can fix this in #39 for intervals; this example with 53 bits suggests that the idea of just removing the indication of the precision in the output of |
The red dot is due to the coverage decrease; tests pass on Travis. |
Adds functions to calculate the midpoint_radius representation.
I agree with both comments, and that this is merged. |
Adds a version of find_roots that returns a tuple of the midpoints, a tuple of the radii, and a tuple of the symbols