Bugfix: Precision error.

When p >= 1, setting p to 0.999999999999999999999999999999, didn't actually make p less than one.