|
inlineconstexpr |
Returns a logical true if and only if the element value is signed and has its sign bit set.
Defined in Header
Parameters
x
: argument.Return value
For signed types The call is_negative(x)
elementwise returns true if and only if the bit of sign (most significant bit) is set.
is_ltz
on integral real values, but for floating values T
, is_negative(mzero<
T>)
is true and if n
is a Nan the result depends of the bit of sign of n
which can be out of control although not undefined.Masked Call
The call eve;is_negative[mask](x)
provides a masked version of eve::is_negative
which is equivalent to if_else (mask, is_negative(x), eve::false( eve::as(x)))
.
Example