Prev | Next |
b = NearEqual(x, y, r, a)
Type
while the other can have type
AD<Type>
or
AD< std::complex<Type> >
.
x
has one of the following possible prototypes:
const Type &x
const AD<Type> &x
const AD< std::complex<Type> > &x
y
has one of the following possible prototypes:
const Type &y
const AD<Type> &y
const AD< std::complex<Type> > &x
r
has prototype
const Type &r
It must be greater than or equal to zero.
The relative error condition is defined as:
@[@
\frac{ | x - y | } { |x| + |y| } \leq r
@]@
a
has prototype
const Type &a
It must be greater than or equal to zero.
The absolute error condition is defined as:
@[@
| x - y | \leq a
@]@
b
has prototype
bool b
If either
x
or
y
is infinite or not a number,
the return value is false.
Otherwise, if either the relative or absolute error
condition (defined above) is satisfied, the return value is true.
Otherwise, the return value is false.
Type
must be a
NumericType
.
The routine CheckNumericType
will generate
an error message if this is not the case.
If
a
and
b
have type
Type
,
the following operation must be defined
Operation | Description |
a <= b
|
less that or equal operator (returns a bool object)
|
Base
operation sequence
.