|
inlineconstexpr |
Returns a logical true if and only if the element value are not equal.
Defined in Header
Parameters
x
, y
: argumentsReturn value
Returns the logical value containing the elementwise equality test result between x
and y
. The infix notation x != y
can also be used.
==
is supported, the !=
operator on standard scalar types is the original one and so returns bool result, not eve::logical
.Masked Call
The call eve::is_not_equal[mask](x)
provides a masked version of eve::is_not_equal
which is equivalent to `if_else (mask, is_not_equal(x, y), false_
Example
The expression numeric(is_not_equal)(x,y)
considers that Nan values are not equal.
Example
definitely
The expression definitely(is_not_equal)(x, y, t)
where x
and y
must be floating point values, evals to true if and only if x
is almost equal to y
. This means that:
t
is a floating_value then the relative error of not confusing is x
and y
is greater than t
\((|x-y| \ge t \max(|x|, |y|))\).t
is a positive integral_value then there are more than t
values of the type of x
representable in the interval \([x,y[\).t
is omitted then the tolerance t
is taken to 3 times the machine \(\epsilon\) in the x
type (3*eps(as(x))
).Example