use fractions instead of floats, which lets us get rid of the ugly PROB_*_TOLERANCE hacks
- this is a lot slower, but it's not noticeable if you use pypy instead of cpython