Halley' Method

Description

Halley' Method


References


Example


The programs B - E are from Valentin's article.
The step-size h is stored in register 0, while the name/number of the program is specified in the variable I.
So let's assume we want to solve program B with step-size h = 10-4 and starting guess 2:

RCL MATRIX B
STO I

EEX 4 CHS
STO 0

2 A

Intermediate values of |dz| are displayed:

(( running ))
0.148589460
(( running ))
0.002695411
(( running ))
0.000000017
(( running ))
0.000000000
(( running ))
1.854105968

Should that annoy you just remove the PSE-command in line 058

Definitions


These definitions are used:


Registers


Intermediate results are kept in these registers:

0: h
1: x
2: y
3: f-x
4: f-y
5: fx
6: fy
I: program

Program Resources

Labels

Name Description
 A Halley's Irrational Formula
 B Find a root of : x^x = pi
 C Find all roots of: ( 2 + 3i ) x^3 - (1 + 2i ) x^2 - ( 3 + 4i ) x - ( 6 + 8i ) = 0
 D Attempt to find a complex root of: x^3 - 6x - 2 = 0
 E Solve Leonardo di Pisa's equation: x^3 + 2 x^2 + 10 x - 20 = 0
 0 calculate the next approximation
 1 calculate f(z + w) | w in {-h, 0, h}

Storage Registers

Name Description
 0 h
 1 x
 2 y
 3 f^{-}_x
 4 f^{-}_y
 5 f_x
 6 f_y

Program

Line Display Key Sequence Line Display Key Sequence Line Display Key Sequence
000 042 43 36 g LSTΧ 084 3 3
001 42,21,11 f LBL A 043 10 ÷ 085 42 25 f I
002 44 1 STO 1 044 34 x↔y 086 20 ×
003 42 30 f Re↔Im 045 20 × 087 1 1
004 44 2 STO 2 046 43 36 g LSTΧ 088 36 ENTER
005 42,21, 0 f LBL 0 047 33 R⬇ 089 2 2
006 45 0 RCL 0 048 30 090 42 25 f I
007 16 CHS 049 11 √x̅ 091 30
008 32 1 GSB 1 050 40 + 092 20 ×
009 44 3 STO 3 051 10 ÷ 093 3 3
010 42 30 f Re↔Im 052 45 0 RCL 0 094 36 ENTER
011 44 4 STO 4 053 20 × 095 4 4
012 0 0 054 44,30, 1 STO 1 096 42 25 f I
013 32 1 GSB 1 055 42 30 f Re↔Im 097 30
014 44 5 STO 5 056 44,30, 2 STO 2 098 20 ×
015 42 30 f Re↔Im 057 43 16 g ABS 099 6 6
016 44 6 STO 6 058 42 31 f PSE 100 36 ENTER
017 45 0 RCL 0 059 45 0 RCL 0 101 8 8
018 32 1 GSB 1 060 43 11 g 102 42 25 f I
019 36 ENTER 061 43,30, 8 g TEST x<y 103 30
020 36 ENTER 062 22 0 GTO 0 104 43 32 g RTN
021 45 3 RCL 3 063 45 1 RCL 1 105 42,21,14 f LBL D
022 45 4 RCL 4 064 45 2 RCL 2 106 43 11 g
023 42 25 f I 065 42 25 f I 107 6 6
024 40 + 066 43 32 g RTN 108 30
025 34 x↔y 067 42,21, 1 f LBL 1 109 20 ×
026 43 36 g LSTΧ 068 45 1 RCL 1 110 2 2
027 30 069 45 2 RCL 2 111 30
028 2 2 070 42 25 f I 112 43 32 g RTN
029 10 ÷ 071 40 + 113 42,21,15 f LBL E
030 34 x↔y 072 36 ENTER 114 2 2
031 45 5 RCL 5 073 36 ENTER 115 40 +
032 45 6 RCL 6 074 36 ENTER 116 20 ×
033 42 25 f I 075 22 25 GTO I 117 1 1
034 36 ENTER 076 42,21,12 f LBL B 118 0 0
035 40 + 077 14 119 40 +
036 30 078 43 26 g π 120 20 ×
037 1 1 079 30 121 2 2
038 43 36 g LSTΧ 080 43 32 g RTN 122 0 0
039 43 33 g R⬆ 081 42,21,13 f LBL C 123 30
040 10 ÷ 082 2 2 124 43 32 g RTN
041 43 33 g R⬆ 083 36 ENTER