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

Edward Loper edloper at gradient.cis.upenn.edu
Thu Apr 15 11:17:56 EDT 2004


#- > DEFAULTMAXEXPONENT = 999999999 #- > DEFAULTMINEXPONENT = -999999999 #- > ABSOLUTEMAXEXP = 999999999 #- > ABSOLUTEMINEXP = -999999999

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. Of course, people usually use tricks to avoid underflow: taking logs, and if necessary performing periodic re-normalization (which means that you don't have probabilities anymore, just some sort of likelihood measures). But it might be nice to not have to do those tricks.

I'm +1 for following the lead set by Long, and not adding unnecessary limits.

-Edward



More information about the Python-Dev mailing list