The Museum of HP Calculators

# Iteration - General method for the HP-10C

This program is by Tizedes Csaba and is used here by permission.

This program is supplied without representation or warranty of any kind. Tizedes Csaba and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

## Overview

With this program you can solve iterative problems, limited by mem. If you want to use in the iteration's calculations more registers, use the following table for the available number of iteration steps:
```You want to use   Steps of available
R0                  51
R0, R1              44
R0, R1, R2          37
R0, R1, R2, R3      30
R0...R4             23
R0...R5             16
R0...R6              9
R0...R7              2
```
If you don't use closing 'R/S' instruction at the end of program, this steps are inceable by 1. The precision of iteration is can controlled by the marked 'EEX 3' steps in the program list. See the examples for more information!

## Listing

```[2:] STO 0
######################
#                    #
# STEPS OF ITERATION #
#                    #
###################### calculated new value required in the stack_x
ENTER
ENTER
ENTER
RCL 0
sub
sq            #calculating
sqrt          #absolute-value
x change y
EEX
3             #use bigger number for more precision
div           #'new/1000' as 0.1% precision
x change y
x<=y?      #'abs(new-old)<=0.1% of new ?'
GTO[1]
roll down
roll down
GTO[2]
[1]: roll down
roll down
R/S

21 steps
```
'sq' is mean 'square', 'sqrt' is mean 'square root'.