|
inlineconstexpr |
Computes the sign of the parameter.
Defined in Header
Parameters
x
: argument.Return value
The elementwise sign of x
computed as:
+1
, if x
is greater than 0-1
, if x
is less than 00
, if x
is equal to 0-0.
, if x
is equal -0If called on Nan
, the result is the actual sign of Nan
.
Masked Call
The call eve;sign[mask](x)
provides a masked version of eve::sign
which is equivalent to if_else (mask, sign(x), x)
.
Example