**************************** Math Operations Help ****************************

Defining math operations allows use of addition, subtraction, multiplication, 
division, and powers (including square roots) to solve equations posed by your 
forms.  When executed, numbers are taken from fields in your form, or from the 
equations you define, and then processed.  Results are loaded into fields of 
your form in various formats such as integer, floating point, and scientific 
notation. 

There are 16 lines on this special form in which you may enter 1 or more 
mathematical equations.  Each equation must fit entirely on a line, it can not 
span two lines.  Equations on the same line must be separated by a space 
except when merging (explained later).  They are processed in order from left 
to right then top to bottom.  Equations have the following form: 

  Expression=Result          Example:  #15*#16/100=#17

'#15*#16/100' is the expression and '#17' is the result.  This expression 
consists of the three operands:  '#15' for field 15, '#16' for field 16, and 
'100'.  There are two operators:  '*' for multiplication, and '/' for 
division.  In this example fields 15 and 16 are multiplied together, divided 
by 100, then placed into field 17 using the default format (described later). 

Rules for expressions:

  o  Consist of 1 or more operands each separated by an operator:
     +, -, *, /, and ^.
  o  An expression must begin and end with an operand with one exception as 
     it may begin with a -.
  o  Expressions are evaluated left to right.  They are written in a manner 
     similar to the way you would use a simple calculator. 

Rules for operands:

  o  May be contents of a field, a number, or 1 of 6 registers (memories).
  o  The contents of a field are represented by the number of that field 
     preceded by a #.  Example:  contents of field 15 are '#15'.
     A field number may be followed by an '@' sign and a positive integer
     to perform stepping that simplify long repetitive expressions.  
     Example:  '#15@3'.  See STEPPING at end of this section.
  o  A number can be an integer or decimal number up to 60 digits long.  It 
     must be positive.
  o  The 6 registers are represented by the capitol letters A through F.  
     They are initially zero until used in a result.

Operators:

    Addition              +
    Subtraction           -
    Multiplication        *
    Division              /
    Power                 ^

Rules for results:

  o  Can be loaded into a field, or into 1 of 6 registers.
  o  A field used for output is specified by the number of that field 
     preceded by a # and followed by a colon and the output format.
     Example:  #17:F8.2   'F8.2'is the format.  A default format of F6.2 is 
     assumed if the colon and format are left off.  This default allows for 
     numbers ranging from '-99.99' to '999.99'.
  o  The 6 registers are represented by the capitol letters A through F.  

Rules for formats:

  o  Possible formats are:  'Iw', 'Fw.d', and 'Ew.d'.
  o  'Iw' is an integer format (no decimal point) 'w' digits wide.  Example:  
     35.4 loaded into a field using an I3 format becomes ' 35'.
  o  'Fw.d' is a floating point format (with decimal point) 'w' digits wide 
     with 'd' digits following the decimal point.  Example:  35.4 loaded into 
     a field using an F5.2 format becomes '35.40'.
  o  'Ew.d' is a floating point format (with decimal point) using scientific 
     notation which is 'w' digits wide with 'd' digits following the decimal 
     point.  Example  35.4 loaded with E10.3 becomes '  .354E+02'.
  o  Any number which requires more than 'w' digits to load will cause the 
     field to fill with "*'s".
  o  A format cannot specify more characters 'w' than the field is wide or an 
     error will result during execution.

EXAMPLES:

Two equations placed on the same line:

      #1+#2/100=#3:F5.2 #1+#3*#7=#8:I8

  (1) Add fields 1 and 2, divide by 100, then place in field 3 as number 
      xx.xx, (5 digits wide with 2 decimal places)

  (2) Field 7 times sum of fields 1 and 3, place into field 8 as xxxxxxxx, 
      (8 digits wide)

Use of square root and temporary value:

        #1+#2=A #3+#4*A^.5=#5:E9.4

  Square root of ( ( sum of fields 1 and 2 ) times ( sum of fields 3 and 4 ) ),
  place result into field 5 as .xxxxE+xx
  Note the use of the temporary register 'A' to hold the sum of fields 1 and 
  2.  This is necessary since parenthesis are not allows in the equations.

Equation beginning with a '-' and using the default format:

        -#1=#2

  Field 2 is written as xxx.xx and is the negative of field 1.

MERGING:

If the result of an equation is used as the first operand in the next 
equation, the two equations can be merged to save space.  Suppose you want 
field 3 to be sum of fields 1 and 2, then field 5 to be the product of fields 
3 and 4.  The following two equations:

        #1+#2=#3:I4 #3*#4=#5

can be merged by removing the ' #3' at the beginning of the second equation.  
The result is:

        #1+#2=#3:I4*#4=#5

Here is as way to make field 3 be the square of the sum of fields 1 and 2:

        #1+#2=A*A=#3

STEPPING:

Long repetitive expressions involving multiplication, addition, and 
subtraction can be simplified using a stepping option.  In expressions where 
the operation is the same over uniformly spaced fields (field number 
increments by some constant), only the first and last field numbers and a 
stepping count are specified: 

        #1+#2+#3+#4+#5=#6       can be replaced by      #1+#5@1=#6

        #4*#8*#12*#16+#17=#18   can be replaced by      #4*#16@4+#17=#18

        #7-#9-#11-#13=#15       can be replaced by      #7-#13@2=#15

Only positive step counts are allowed.  The last field number minus the first 
field number in the stepping loop must be positive and a multiple of the step 
count. 

NOTES:

If you can't remember the numbering of the fields, F6 ON THIS FORM WILL 
DISPLAY THE FIELDS IN ORDER SHOWING ROW, COLUMN, AND LENGTH in characters. 

If you want the result to right justify in the field, use the word processing 
features form to define that field as right justified.  The same is true for 
left and center justified.

Single precision arithmetic (IEEE standard) is used for all math operations.  
All numbers are converted to single precision before use.  Results placed 
into fields are rounded to the displayed precision. 

Entries made on this form are not checked until tried during math execution 
(normally F6).  Improperly defined equations will cause the math operations to 
terminate early and display an error message.  This is also true for fields 
that do not contain a valid number, and such things divide by zero, overflow, 
etc. 

