Tuesday 24 May 2011

Approximate Integration - the program

The logic for the approximate integration program was presented previously. Here is the logic converted into a program for the fx-50F:-

?→A:?→B:?→D:0→M:(B-A)÷(2D)→Y:1→C:While C≤D:1→B:Lbl 0:
B=1=>A+2(C-1)Y→X:B=2=>A+2CY→X:B=3=>A+(2C-1)Y→X:X²→X:
YX÷3→X:B=3=>4X→X:XM+:B+1→B:B≤3=>Goto 0:C+1→C:WhileEnd:
M▲

This is pretty much how the program looks when keyed into the calculator in edit mode except it all appears on one continuous line. Special Program Commands (? → => : Lbl While WhileEnd = ≤ ▲ Goto) are input using the [SHIFT] [P-CMD] keys. The cursor key (marked Replay) is used to switch between various screens of commands. Memory variables A, B, C, D, M, X and Y are input using [ALPHA] [A], [B] etc keys. The ":" Separator Code command is used frequently and can be alternatively input using the [EXE] key.

This program is 136 steps in length.

No comments:

Post a Comment