Help for MFD
PURPOSE
MFD is a linited version arithmetic IBIS function program that operates
in double-precision. Currently, program MF accepts IBIS columns in 'DOUB"
format but performs all calculations using only "real" precision. MF calls
KNUTH and XKNUTH which only handle real and complex data.
MFD preserves full double-precision accuracy and data detail. However,
only the most basic functional expressions are available in MFD, and only
one expression is permotted for each call of the program.
EXECUTION:
mfd int params
where
int is the input IBIS Interface (tabular) file opened for update
Params is a standard VICAR parameter field
The input file is an IBIS interface file which is also used for output.
The VICAR SIZE file is not used.
The available functions include:
ADD - Add two or more columns together.
SUB - Subtract columns.
MULT - Multiply columns.
DIV - Divide columns.
INT - Take the integer value of the columns.
ABS - Determine the absolute value of the columns.
SQR - Find the square root of the columns
MIN - Find the minimum value in the columns.
MAX - Find the maximum value in the columns.
SET - Put the provided VALUE in the columns.
INDEX - Put a run of numbers from 1 to NROW in the column.
For the following logicals, the output column is set to TRUE=1 orFALSE=0
EQ - If the column equals the provided VALUE.
NE - If the column is not equal to the provided VALUE.
LE - If the column is less than or equal to the provided VALUE.
LT - If the column is less than the provided VALUE.
GE - If the column is greater than or equal to the provided VALUE.
GT - If the column is greater than the provided VALUE.
EXAMPLES
MFD A INCOLS=(1,2,3) OUTCOLS=1 'ADD
In this example, the data in columns 1, 2, and 3 are added together,
and the sum is placed in C1, overwritting the previous data.
MFD A INCOLS=(4,5) OUTCOLS=(6,7) 'INT
The integer values of the data in C4 are put in C6, and the integer
values of C5 are put in C7.
MFD A INCOLS=9 OUTCOL=10 'EQ VALUE=128
If the value in C9 is equal to 128, then a 1 is placed in C10,
otherwise a 0 is placed in C10.
MFD A OUTCOL=11 'SET VALUE=999
The number 999 is placed in all rows of C11.
MFD A OUTCOL=8 'INDEX
A run of numbers from 1 to the number of rows is placed in C8.
RESTRICTIONS:
The maximum input line length is 255 characters.
The maximum number of columns in the interface file is 100.
HISTORY:
BAM - jpl - October, 1998
PARAMETERS:
INPUT
Input IBIS interface
data file
INCOLS
The input column/s on
which the function will
operate.
OUTCOLS
The output column/s on
which the result of the
function will be placed.
VALUE
Value for comparison in
logical functions;
value to be inserted into
column for SET function.
FUNC
ADD,SUB,MULT,DIV,INT,ABS,SQR,MIN
MAX,SET,INDEX,EQ,NE,LE,LT,GE,GT
See Examples:
Cognizant Programmer: