Double clicking on the application icon installs it on the icon bar in the usual way. Clicking select on the iconbar icon opens the main application window. Use this to choose
- the numerator of the fraction (a in a/b)
- the denominator (b)
- the maximum denominator permitted in the partition reciprocals
- the greatest number of terms to be allowed
These values can be adjusted with the small blue adjuster icons. They will not allow you to enter a fraction more than 1, such as 3/2. You can however type in such a fraction. The program may well find partitions, but not necessarily and not all of them as it will for "legal" fractions.
The "Clear" icon will insert default values for these quantities, namely a fraction of 1/2, 4 terms allowed with a maximum denominator of 1/100.
"Search" will initiate the search. The results are sent to a task window under the control of whatever application on your machine owns the text filetype (&FFF). This is normally Edit, which will be installed on your iconbar if not already there. For high values of maximum denominator and (especially) of search depth you may as well leave the machine on whilst you go shopping, or to the pub or to bed, but "reasonable" searches are very fast. Soon after the start the results window opens and you can see them building up. You end with a text window belonging to Edit (or whatever), NOT to EgFrac. You may do what you will with this.
While the search is in progress, the pointer becomes the hourglass, so long as it is over our own (not the Edit) window.
You can abort the search process at any time
- by clicking the icon now labelled STOP; or
- by hitting the ESCAPE key (provided EgFrac's window owns the machine's
input focus - title bar is cream when this is so); or
- by closing the EgFrac window.
Within the application directory is a simple basic program EgFrac. This will run a bit faster if lengthy searches are required as it suffers no desktop processing overheads. Use CTRL-B outside the desktop to direct its output to your printer.
========================
The algorithm
========================
If a/b = 1/c + 1/d + ... (n terms), then the start integer c is constrained. 1/c is certainly LESS than a/b, and 1/nc is certainly MORE than it. So minimum (h) and maximum (k) possible first terms are established.
The algorithm is a simple recursive structure:
FIND (num, den, trial, depth)
REPEAT
IF 1/depth = num/den THEN
success, output series of stored values ending with trial