Author rhettinger
Recipients Jean Abou Samra, Jean_Abou_Samra, facundobatista, mark.dickinson, rhettinger, skrah
Date 2020-07-18.01:11:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595034696.48.0.206362274292.issue41315@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-07-18 01:11:36rhettingersetrecipients: + rhettinger, facundobatista, mark.dickinson, skrah, Jean_Abou_Samra, Jean Abou Samra
2020-07-18 01:11:36rhettingersetmessageid: <1595034696.48.0.206362274292.issue41315@roundup.psfhosted.org>
2020-07-18 01:11:36rhettingerlinkissue41315 messages
2020-07-18 01:11:36rhettingercreate