Treatment checkedEuclidRem
std/ops/num::checkedEuclidRem
Generics
◻ N:
CheckedEuclid
Inputs
⇥ a:
Stream<N>
⇥ b:
Stream<N>
Outputs
↦ rem:
Stream<Option<N>>
Gives euclidian remainder of division from two streams, checking if division is possible or if overflow occurs.
Remainder is computed for values passed through a
divided by b
and send in rem
.
This treatment outputs an option containing a _mod_ b
, or none if division is not possible (as division by 0), or result cause overflow in data type.