(12C) Newton's Method

03242018, 01:31 PM
(This post was last modified: 03242018 07:30 PM by Dieter.)
Post: #2




RE: (12C) Newton's Method
(03242018 01:10 PM)Gamo Wrote: This is a very good all around Solver for HP12C and this one work very well. ...if you remove line 33. ;) The sequence 2 ENTER x SQRT does not make sense, this always yields 2. Remove the line with the "2" and the program should work as intended (compare the absolute value of the last correction term with the tolerance in R2). This also means that all references to line 42 should be changed to line 41. There is an error in the instructions for the example: the tolerance has to be stored in R2. So it's EEX 6 CHS STO 2. I think you should also mention that x^x=y here is transformed to x · ln x – ln y = 0, which is how the function is coded. The program may have an error in that it stops the iteration not only if f(x)=0 but also if f(x+h)=0. OK. this can be fixed easily. And maybe the final step should better be GTO 00 instead of R/S so that the program can be restarted with a simple R/S. Here is my attempt at a corrected version: Code: 01 STO 1  store the tolerance in R2  enter a guess, start with R/S By the way, I have also tried a Regula Falsi / Illinois version for the 12C. This is slightly more effort as the 12C does not support subroutines and there are three different cases (as opposed to two for Newton) that have to be handled by the code that accepts the return value of the function call. But it is possible – in 70 steps. Dieter 

« Next Oldest  Next Newest »

Messages In This Thread 
(12C) Newton's Method  Gamo  03242018, 01:10 PM
RE: (12C) Newton's Method  Dieter  03242018 01:31 PM
RE: (12C) Newton's Method  Dieter  03272018, 06:08 PM
RE: (12C) Newton's Method  Gamo  03252018, 03:05 AM
RE: (12C) Newton's Method  Dieter  03252018, 06:26 PM
RE: (12C) Newton's Method  Gamo  03282018, 04:23 AM
RE: (12C) Newton's Method  Carsen  03292018, 05:11 AM
RE: (12C) Newton's Method  Dieter  03292018, 05:04 PM
RE: (12C) Newton's Method  Gene  03292018, 05:23 PM
RE: (12C) Newton's Method  Gamo  03302018, 01:15 PM
RE: (12C) Newton's Method  Dieter  03302018, 02:00 PM
RE: (12C) Newton's Method  Gamo  03312018, 01:15 PM
RE: (12C) Newton's Method  Dieter  03312018, 05:27 PM

User(s) browsing this thread: 1 Guest(s)