I am running long simulations. I record the results into a vector to compute statistics about the data. I realized that, in theory, those samples could be the result of a di
For IEEE floats, division of a finite nonzero float by 0 is well-defined and results in +infinity (if the value was >zero) or -infinity (if the value was less than zero). The result of 0.0/0.0 is NaN. If you use integers, the behaviour is undefined.