The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(10C) Newton's Method Solution to f(x) = 0
03-13-2021, 05:15 AM (This post was last modified: 03-14-2021 03:08 AM by Gamo.)
Post: #1
(10C) Newton's Method Solution to f(x) = 0
I don't see one here the Solution to f(x) = 0 program for the HP-10C

So I'm adapted this Newton's Method Solution to f(x) = 0 from the

HP-25 Applications Book and since the HP-25 only got 49 programming space so

it is possible to extended a bit more to work on the HP-10C or HP-12C as well.

---------------------------------------
Procedure:

Put f(x) equation at line 41 by start at [GTO] 40 and end with [GTO] 18

Set Precision to Register 2 : example [EEX] [CHS] 6 [STO] 2

[f] [PRGM]
Enter the nearest X (Your guess) to the root then press [R/S]

Root is save to Register 1
--------------------------------------
Program:
Code:

01 STO 1
02 CLx
03 STO 0
04 RCL 1
05 GTO 17
06 R↓
07 STO 4
08  1
09 STO 0
10 RCL 1
11 RCL 1
12 EEX
13  5
14  ÷
15 STO 3
16  +
17 GTO 41
18 X=0
19 GTO 39
20 RCL 0
21 X=0
22 GTO 06
23 R↓
24 RCL 4
25  ÷
26  1
27  -
28 1/x
29 RCL 3
30  x
31 STO-1
32  0
33 X<>Y
34 X≤Y
35 CHS  
36 RCL 2 
37 X≤Y
38 GTO 02
39 RCL 1
40 GTO 00
41 Start f(x) 
42 .
43 .
44 .
45 .
.
.
.
> GTO 18

Example: X^X = 1000

I will store 1000 to Register 5

Enter Precision: [EEX] [CHS] 6 [STO] 2

Enter Equation: [GTO] 40 [P/R]

[LN] [LSTx] [x] [RCL] 5 [LN] [-] [GTO] 18 [P/R]

Run: [f] [PRGM]

Enter guess: 6 [R/S] ... about 30 second display 4.555536

To check answer: [RCL] 1 [RCL] 1 [Y^X] display 999.99997

Put to FIX 2: [f] [FIX] 2 dispaly 1,000.00

Remark:

Program Line Number 32 to 35 is the [ABS] function.

This [ABS] alogrithm only use the conditional test so it help on
the program running speed especially on a program that do iterations.

For more detail about this function here:

https://www.hpmuseum.org/forum/thread-12138.html


Gamo 3/2021
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(10C) Newton's Method Solution to f(x) = 0 - Gamo - 03-13-2021 05:15 AM



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