8.2.7 VeryClose_Real Procedure

The VeryClose procedure provides a way to check whether or not two variables are ``Very Close'' to each other. The definition of ``Very CLose'' that is used is ``within 10 times the internumeral spacing distance in the vicinity of the numbers''. This test should be used instead of equality tests for reals. For array-valued X and Y, all the values must satisfy the condition for the result to be true.

Note that I would rather call this routine ``Very_Close'', but the F90 standard does not allow underscores in defined operator names (i.e. ``.Very_Close.'' is not allowed).

Calling syntax:

Logical = X .VeryClose. Y ,
Logical = VeryClose(X, Y) or

Input variables:

 X, Y  Input real, scalar or array variables to test.

Output variable:

 VeryClose  Logical which is true if X and Y are within 10 times the spacing distance between variables at (X+Y)/2.

The VeryClose_Real code listing contains additional documentation.

Michael L. Hall