compucorp 322g scientist
the 322 has an 80 step program memory. a switch selects either run mode or load mode. in load mode, keys are recorded as a program sequence. there are no apparent jumps or loops. but there are tricks. the 324 model has 2x80 step program memory. another switch is present to select the program bank. two banks might sound crazy, but it actually works amazing well. for example, the manual gives a program split over two banks to compute standard deviations. the first bank hosts a program that simply accumulates n, sum(x) and sum(x^2) in memories. the second bank contains a program to use these memories to compute the standard deviation using the familiar textbook formula. the trick here is that no loops are required. you run bank1 over each data entry, switch to bank 2 and execute. here's a program to compute factorials; ST 1 ST * 2 1 ST - 1 RCL 1 1/x RCL 1. here's what you do. preload 1 into memory 2 (1 ST 2), type in your number (eg 6), and hit start. the trick here is that the program automatically runs off the end back to the start (a loop!) and the 1/x operation causes an error when n decrements to zero. this halts execution leaving n! in memory 2. if you thought that was a taunt, here's one to find the maximum value of the polynomial y = ax^2 + bx + c
the program simply searches the y values, incrementing x by the given dx (eg 0.25). the tricks here are to use the end to start program loop, like in the factorial program, and to use sqrt as a synthetic conditional jump. this is done by calculating sqrt(y - lastY). when y moves past the maximum, the argument to sqrt will be negative and it will error halting the program at the right place + dx, subject to increment resolution. another program from the manual shows how, using the 324's two banks, quadratic equations can be solved for both real and complex roots. basically, the first program bank attempts the standard textbook roots for reals (ie (-b+/-sqrt(b^2-4ac)/2a) and if this causes an error, you switch to the second bank which then assumes complex roots and evaluates them for display. altogether a simple, but effective idea.
|