remainder

Calculates the remainder of the division x / y

@IEEECompliant("remainder", 25)
remainder
(
D1
D2
)
(
auto const ref D1 x
,
auto const ref D2 y
)

Parameters

x D1

dividend

y D2

divisor

Return Value

Type: auto

The value of x - n * y, where n is the quotient rounded to nearest even of the division x / y

Throws

InvalidOperationExceptionx or y is signaling NaN, x = ±∞, y = ±0.0
UnderflowExceptionresult is too small to be represented
DivisionByZeroExceptiony = 0.0
InexactExceptionthe result is inexact

Special values

xyremainder(x, y)
NaNanyNaN
anyNaNNaN
±∞anyNaN
any0.0NaN
any±∞NaN

Meta