Treatment checkedEuclidDiv
std/ops/num::checkedEuclidDiv
Generics
◻ N:
CheckedEuclid
Inputs
⇥ a:
Stream<N>
⇥ b:
Stream<N>
Outputs
↦ quot:
Stream<Option<N>>
Proceed to euclidian division from two streams, checking if division is possible or if overflow occurs.
Values passed through a
are divided by b
and send in quot
.
This treatment outputs an option containing a ÷ b
, or none if division is not possible (as division by 0), or result cause overflow in data type.
ℹ️ For floating types, this function return infinity for divisions by 0
.