Small Solver Program
|
02-17-2019, 09:06 AM
Post: #12
|
|||
|
|||
RE: Small Solver Program
(02-17-2019 02:57 AM)Gamo Wrote: I just fine tune this solver program for HP-11C Your program doesn't work for this simple example: \(x^2+x=x(x+1)=0\) I've entered the following program: Code: LBL B Example: -2 ENTER -0.5 A 9.999999 99 The reason is that the function value is divided by -0.5, making it larger and larger: Code: LBL 1 // Solver Routine Another thing is this in this loop: Code: LBL 0 When you return to label 0, the same value in register 1 will be used as before. This function evaluation can be avoided if you save the result of the previous evaluation. You could move this block: Code: LBL 2 Over here and avoid the jump GTO 2: Code: CLx Take a look at Csaba's solution for the HP-12C using the secant method. Cheers Thomas |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)