![]() |
Prev | Next | near_equal |
Syntax |
# include <f2cad/near_equal.hpp>
|
bool near_equal(double x, double y, double r, double a)
|
\[
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.
libf2c_adolc.a
,
libf2c_cppad.a
,
and
libf2c_fadbad.a
has a copy of this routine in it.