Message373867
FWIW, I don't really buy into the use case. In my experience a nest of existing functions that are designed for floats will somewhere being using a float constant like 0.5, e, pi, or tau. So, just feeding in a decimal input isn't sufficient to get it to work. Also, for your idea to work, the function couldn't explicitly reference math.exp(x); instead, it must just use exp() so that you could substitute, "from decimal import exp" for "from math import exp".
Also, this proposal would be a limited utility because most of the functions in the math module don't have an existing equivalent in the decimal methods. The inconvenient fact is that the decimal module wasn't designed to be a drop-in substitute for floats — it's principal design objectives were somewhat different. |
|
Date |
User |
Action |
Args |
2020-07-18 01:11:36 | rhettinger | set | recipients:
+ rhettinger, facundobatista, mark.dickinson, skrah, Jean_Abou_Samra, Jean Abou Samra |
2020-07-18 01:11:36 | rhettinger | set | messageid: <1595034696.48.0.206362274292.issue41315@roundup.psfhosted.org> |
2020-07-18 01:11:36 | rhettinger | link | issue41315 messages |
2020-07-18 01:11:36 | rhettinger | create | |
|