|
inlineconstexpr |
Parameters
x
, ...xs
: real arguments.tup
: non empty tuple of arguments.c
: Conditional expression masking the operation.m
: Logical value masking the operation.Return value
z
denotes the prduct of the xs
, the call div[o](x, xs...)
produces:eve::trunc(div(x, z))
, if d
is toward_zero
.eve::floor(div(x, z))
, if d
is downward
.eve::ceil(div(x, z))
, if d
is upward
.eve::nearest(div(x, z))
, if d
is to_nearest
.strict
the option ensures generally faster computation, but strict inequality.strict
the option ensures generally faster computation, but strict inequality.x
by y
. The result is always defined even if the denominator is 0.div[left](a, b)
is semantically equivalent to div(b, a)
The relevant cases are just in fact the division by 0 for integral types in which case the result is eve::valmin(as(x))
or [valmax(as(x))
](ref eve::valmax) according to the dividend sign, and the division of valmin(as(x))
by -1 that produces valmax(as(x))
.
div(x, y)
is equivalent to x / y
if x
or y
is an simd value./
is supported for two parameters, the /
operator on standard scalar types is the original one and so can lead to automatic promotion.