-
Notifications
You must be signed in to change notification settings - Fork 53
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
fixed doctest issue #215
fixed doctest issue #215
Conversation
It resolves issue #216 |
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 is great. Thanks so much! There are a few things to sort out. Do you want to look into them? If not, I can.
docs/src/roots.md
Outdated
@@ -366,15 +366,15 @@ dfᵏs (generic function with 1 method) | |||
|
|||
```jldoctest roots | |||
julia> Roots.newton(f, D(f), 2) | |||
2.0945514815423265 | |||
3.141592653589793 |
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.
Hmm, have to see what happened here... That difference isn't a numerical one.
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.
Let me check again.
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.
You are right. By mistake I had changed the f
src/find_zero.jl
Outdated
julia> fn = x -> (2x*cos(x) + x^2 - 3)^10/(x^2 + 1); | ||
|
||
julia> x0, xstar = 3.0, 2.9947567209477; | ||
|
||
julia> find_zero(fn, x0, Order2()) ≈ xstar | ||
true | ||
false |
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 one is odd too, as locally it works for me:
julia> fn = x -> (2x*cos(x) + x^2 - 3)^10/(x^2 + 1);
julia> x0, xstar = 3.0, 2.9947567209477;
julia> find_zero(fn, x0, Order2()) ≈ xstar
true
julia> find_zero(fn, x0, Order2()), xstar
(2.9947567209477, 2.9947567209477)
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.
In my environment, it doesn't work. Had you tried in 1.6.0
?
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.
done
docs/src/roots.md
Outdated
|
||
``` | ||
|
||
Or, for Halley's method: | ||
|
||
```jldoctest roots | ||
julia> Roots.halley(f, D(f), D(f,2), 2) | ||
2.0945514815423265 | ||
3.141592653589793 |
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 must be the same issue. I wonder if D or f is not matching the example.
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.
Let me chack again.
Yeah, please tell me? I can. |
This one might have floating point issues. I'm testing on v"1.6.0" on a
mac. What about you?
…On Thu, May 13, 2021 at 7:33 AM Rohit Singh Rathaur < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/find_zero.jl
<#215 (comment)>:
> julia> fn = x -> (2x*cos(x) + x^2 - 3)^10/(x^2 + 1);
julia> x0, xstar = 3.0, 2.9947567209477;
julia> find_zero(fn, x0, Order2()) ≈ xstar
-true
+false
In my environment, it doesn't work. Had you tried in 1.6.0?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#215 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADG6TEZ7HKBSDPQNQ4ZGH3TNO2HZANCNFSM442I2HDQ>
.
--
John Verzani
Department of Mathematics
College of Staten Island, CUNY
|
Yeah, now it has resolved. The test case has also passed. |
Thanks again! Once CI passes, I'll merge in. |
Codecov Report
@@ Coverage Diff @@
## master #215 +/- ##
=======================================
Coverage 85.02% 85.02%
=======================================
Files 9 9
Lines 1896 1896
=======================================
Hits 1612 1612
Misses 284 284
Continue to review full report at Codecov.
|
HI @RohitRathore1 I'm seeing this error (https://github.com/JuliaMath/Roots.jl/pull/215/checks?check_run_id=2576725090) Can you address? If not, I'll pick it up. If you do, would you also bump the version number? Then we can merge and tag. Thanks. |
Yeah, I can. What do you mean by |
In the Project.toml file change |
ok. |
CI is still showing an issue. Is this an easy fix? If so, I'll wait. Otherwise, I can merge in and sort out. |
Yes, it's easy to fix. You can wait. I will fix it. |
Thanks again for your efforts here! So very much appreciated. |
No description provided.