Boulder Laboratory for 3-Dimensional Electron Microscopy of Cells
NUMERICDIFF(1) NUMERICDIFF(1)
NAME
numericdiff - compare numeric entries between two text files
SYNOPSIS
numericdiff [options] input_file_A [input_file_B]
DESCRIPTION
Numericdiff compares the numeric contents of two text files. It scans
through each file, identifying sections of purely numeric text and sections
with non-numeric text. Within a section of numeric text, it reads the
numbers from each file and finds the maximum absolute value of the
difference between numbers in each column. These maxima are reported for
each numeric section, and if limits for the maximum differences are entered,
the program reports that there are differences above the limits and exits
with a non-zero status.
The lines in a section may have different numbers of columns. The two files
can differ in the number of lines in a numeric section; the extra lines in
one file will be ignored. Sections of non-numeric text can also be
different length between the two files. However, there is no attempt to
match the text in non-numeric sections, so both files must match in the way
that they alternate between numeric and non-numeric text.
Numericdiff uses the PIP package for input exclusively (see the manual page
for pip). The following options can be specified either as command line
arguments (with the -) or one per line in a command file or parameter file
(without the -):
-ainput OR -AInputFile File name
First file to compare. If this option is not entered, the first
non-option argument will be used for this input file.
-binput OR -BInputFile File name
Second file to compare. If this option is not entered, the second
non-option argument will be used for this input file, if it exists. If
this file is not specified at all, a backup file to A will be used (the A
filename with ~ appended).
-max OR -MaxDifferences Multiple floats
Maximum allowed difference for each column of input. A difference greater
than the specified maximum for the particular column will cause the
program to exit with a non-zero status. In addition, if the -big option
is selected, the two lines that differ will be printed. The number of
maximum values entered determines how many columns are tested; columns
past that number are ignored. If the input files have multiple sections
of numeric data, this option can be entered multiple times to specify the
limits for each section. If there are more numeric sections than entries,
the last entry of limits will be applied to the remaining sections.
(Successive entries accumulate)
-general OR -GeneralFormat
Print maximum differences in general format (up to 6 numbers per line, 5
decimal places, exponential notation for small or large numbers). The
default is to use a fixed format (f10.4) that allows up to 8 numbers per
line.
-strip OR -StripLinesWith Text string
Convert lines containing the specified text to numeric lines. This entry
allows one type of line with labeled numeric output to be converted into
pure numeric output and compared between the files.
-big OR -BigDifferenceOutput
Output the pair of input lines whenever one of the differences is greater
than the maximum difference specified with the -max option.
-help OR -usage
Print help output
-StandardInput
Read parameter entries from standard input.