Prev Next near_equal

Determine if Two Double Values Are Nearly Equal
Syntax # include <f2cad/near_equal.hpp>
bool near_equal(double x, double y, double r, double a)

Description
Returns true if  \[
     x = y
     \; {\rm or} \;
     | x - y | \leq a
     \; {\rm or} \;
     \frac{ | x - y | } { |x| + |y| } \leq r
\] 
Otherwise, it return false. Note that r is a relative error bound and a is an absolute error bound.

Linking
Each of the libraries libf2c_adolc.a, libf2c_cppad.a, and libf2c_fadbad.a has a copy of this routine in it.
Input File: lib/near_equal.cpp