Post Reply 
HP 11C real root finder [Newton Method]
01-15-2014, 05:53 AM
Post: #7
RE: HP 11C real root finder [Newton Method]
(01-12-2014 01:26 PM)Dieter Wrote:  
(01-12-2014 08:31 AM)Namir Wrote:  ...h = 0.001*(ABS(X)+1)

First of all, instead of multiplying with \(10^{-3}\), dividing by \(10^{3}\) is one step shorter. ;-)

This method for determining h will work in most cases, but not for very small arguments. Consider \(x = 10^{-4}\) or even \(x = 10^{-40}\). That's why I prefer \(h = x/10^4\). On the 34s, the result can be easily rounded to 1 or 2 significant digits (RSD 1) to prevent slight roundoff errors. As usual, \(x=0\) is handled as \(x=1\).

Dieter

Sure, dividing by 1000 is a step shorter. Originially, I had learned to calculate h using an If statement:

Code:
If |x| >= 1 Then
  h= x/100
else
  h = 1/100
end if

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.

Namir
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 11C real root finder [Newton Method] - Namir - 01-15-2014 05:53 AM



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