SMath Studio Forum
»
SMath Studio
»
Samples
»
Basic single variable Secant (Newton-Raphson) Solver that just works
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
I figured I am not the only one who can benefit from a simple numeric solver that "just works". It will likely become obsolete once Davide updates the Nonlinear Solvers plugin. Enjoy. SolveNewtonRaphson.sm (13kb) downloaded 30 time(s).Edited by user 23 November 2016 22:10:30(UTC)
| Reason: Not specified
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Interesting, but good thing Smath 5346 does it as well w/o all that complexity. Shouldn't it be constructed around "While" loop ? Remember that any invented iterative solver for Smath can't exceed better accuracy than around 12 decimals because of the granularty of Smath. The native Smath 'solve' has a universal structure wrt: 1. is implicit 2. the bracketing [x1,x2] 3. very easy to handle. Jean
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Alex, The Newton-Raphson code in your first post would surely work here in two cumbersome presentations. For this example, 'roots' is a better candidate.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
If only either of the two could handle the units I would not need to go through all the trouble. They do not, hence I had to get inventive.
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Samples
»
Basic single variable Secant (Newton-Raphson) Solver that just works
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.