Using epsilon check for non-decimal but rational probabilities.

It may be better to check with an epsilon if the probabilities are rational but not decimal because of the precision error.
You can change the epsilon (```0.0000001```) at will if it is not sufficient for you.