[Python-Dev] Decimal data type issues (original) (raw)

Edward Loper edloper at gradient.cis.upenn.edu
Fri Apr 16 00:52:04 EDT 2004


Tim Peters wrote:

I can think of at least one real use for exponents outside this range: probabilities. E.g., if I'm using probabilistic models to estimate P(author|text), I end up multiplying together a large number of very low probabilities, and the total probability could easily get this small. No, it couldn't -- and if you worked hard to contrive an example, a probability in the end smaller than the probability that the universe will spontaneously decide to run time backwards for a century is accurately enough represented by 0 (which your example will underflow to).

As long as the limits are soft (and can be changed), I won't object too strenuously, because someone who wanted extremely large/small numbers could use them. But...

Basically, I don't see much loss from adding the constraints, but I also see very little gain.

-Edward



More information about the Python-Dev mailing list