if cdf > 1:
            # Presumably numerical noise, e.g. 1.0000000000000002
            cdf = 1.0