HP 11C real root finder [Newton Method]
01-15-2014, 08:38 PM
Post: #8
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: HP 11C real root finder [Newton Method]
Namir, sorry that I was not able to express myself clearly. I wanted to point out that I do not think it's a good idea to use h = 0,01 or 0,001 for any value below 1. This may lead to significant errors since h may be much, much larger than x. For instance, if x = 1E-10, h = 1E-3 is not recommended. Here, h = 1E-13 should be better.

That's why I prefer to set h = 0,001 x or similar. With the only exception x=0 where x may be 0,001.

(01-15-2014 05:53 AM)Namir Wrote:  Until I realized one day that .01*(|x|+1) does the job and eliminates the need for labels and GOTOs. I recently started using .001 instead of 0.01. Using the expression for h ensures that if x=0, h is not zero.

This can be coded this way, for instance:
Code:
 X=0?  e^x  EEX   3   /
Look, no labels or gotos required. ;-)

Or even more elegant on the 34s:
Code:
 X=0?  INC X  SDR 3  RSD 1   ' optional

Dieter
 « Next Oldest | Next Newest »

 Messages In This Thread HP 11C real root finder [Newton Method] - Carlos CM (Mexico) - 01-09-2014, 11:59 PM RE: HP 11C real root finder [Newton Method] - Thomas Klemm - 01-10-2014, 12:57 AM RE: HP 11C real root finder [Newton Method] - Carlos CM (Mexico) - 01-10-2014, 05:28 PM RE: HP 11C real root finder [Newton Method] - Namir - 01-12-2014, 08:31 AM RE: HP 11C real root finder [Newton Method] - Dieter - 01-12-2014, 01:26 PM RE: HP 11C real root finder [Newton Method] - Namir - 01-15-2014, 05:53 AM RE: HP 11C real root finder [Newton Method] - Dieter - 01-15-2014 08:38 PM RE: HP 11C real root finder [Newton Method] - Thomas Klemm - 01-14-2014, 08:56 PM

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