HP 50g User's Reference Manual
Download Advanced user's reference manual of HP 48gII Calculator for Free or View it Online on All-Guides.com.
Brand: HP
Category: Calculator
Type: Advanced user's reference manual
Model: HP 48gII , HP 49g+ , HP 50G
Pages: 693
F-2 Parallel Processing with Lists
integer matrix having 3 rows and 4 columns. Since these commands can normally use lists as arguments, they
cannot perform parallel processing, except by using DOLIST.
Program control commands.
Program control structures and commands do no perform parallel processing
and cannot be forced to do so. However, programs containing these structures can be made to parallel process by
using DOLIST. For example,
{ 1 2 3 4 5 6 } 4 « IF DUP 3 ‰ THEN DROP END »
DOLIST
returns
{ 3 4 5 6 }
.
Group 3: commands that sometimes work with parallel processing
Graphics commands that can take pixel coordinates as arguments expect those coordinates to be presented as
two-element lists of binary integers. Since these commands can normally use lists as arguments, they cannot
parallel process, except by using DOLIST.
For the two-argument graphics commands (BOX, LINE, TLINE), if either argument is not a list (a complex
number, for example), then the commands will parallel process, taking the list argument to be multiple complex
number coordinates. For example,
(0,0) {(1,1) (3,2)} LINE
will draw two lines — between (0,0)
and (1,1) and between (0,0) and (3,2).
Group 4: ADD and +
On HP 48S and HP 48SX calculators, the + command has been used to append lists or to append elements to
lists. Thus
{ 1 2 3 } 4 +
returns
{ 1 2 3 4 }
. With the advent of parallel processing in the HP 48G
series, the ADD command was created to perform parallel addition instead of +.
This has several ramifications:
To add two lists in parallel, you must do one of the following:
Use ADD from the
!´%LIST%
menu.
Create a custom menu containing the ADD command.
Assign the ADD command to a user-defined key.
User programs must be written using ADD instead of + if the program is to be able to perform direct parallel
processing, or written with + and applied to their arguments by using DOLIST. For example, programs such as
«
→x 'x+2' »
will produce list concatenation when x is a list rather than parallel addition, unless rewritten as
«
→ x 'x ADD 2' »
Algebraic expressions capable of calculating with variables containing lists (including those intended to become
user-defined functions) cannot be created in RPN syntax since using ADD to add two symbolic arguments
concatenates the arguments with + rather than with ADD. For example,
'X' DUP 2 ^ SWAP 4 * ADD
'F(X)' SWAP =
produces
'F(X)=X^2+4*X'
rather than
'F(X)=X^2 ADD 4*X'
.
Group 5: Commands that set modes / states
Commands that store values in system-specific locations so as to control certain modes and machine states can
generally be used to parallel process data. The problem is that each successive parameter in the list cancels the
setting established by the previous parameter. For example,
{ 1 2 3 4 5 } FIX
is effectively the same as
5
FIX
.
Group 6: One-argument, one-result commands
These commands are the easiest to use with parallel processing. Simply provide the command with a list of
arguments instead of the expected single argument. Some examples:
{ 1 -2 3 -4 }
returns
{ 1 2 3 4 }
DEG { 0. 30. 60. 90. } SIN
returns
{ 0. .5 .866025403784 1. }
{ 1 A 'SIN(Z)'} INV
returns
{ 1 'INV(A)' 'INV(SIN(Z))' }