approx |
Table of contents
ProcedureAPPROX ( Approximate equality ) LOGICAL FUNCTION APPROX ( X, Y, TOL ) AbstractReturn .TRUE. if two double precision numbers are equal to within some tolerance. Required_ReadingNone. KeywordsCOMPARE NUMBERS DeclarationsIMPLICIT NONE DOUBLE PRECISION X DOUBLE PRECISION Y DOUBLE PRECISION TOL Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- X, Y I Double precision numbers. TOL I Tolerance. The function is .TRUE. whenever |X - Y| <= TOL. Detailed_InputX, Y are arbitrary double precision numbers. TOL is a tolerance. X and Y are considered to be equal if they differ by no more than this amount. If TOL is negative, X and Y are never considered equal. Detailed_OutputThe function is .TRUE. whenever |X - Y| <= TOL, and is .FALSE. otherwise. ParametersNone. ExceptionsError free. FilesNone. ParticularsNone. ExamplesC C If the eccentricity is near one, this a parabola. C IF ( APPROX ( ECC, 1.D0, 10.D-12 ) ) THEN TYPE = 'PARABOLA' ELSE IF ( ECC .LT. 1 ) THEN TYPE = 'ELLIPSE' ELSE TYPE = 'HYPERBOLA' END IF RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionJ. Diaz del Rio (ODC Space) W.L. Taber (JPL) I.M. Underwood (JPL) VersionSPICELIB Version 1.1.0, 26-OCT-2021 (JDR) Added IMPLICIT NONE statement. Edited the header to comply with NAIF standard. SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) Comment section for permuted index source lines was added following the header. SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) |
Fri Dec 31 18:35:58 2021