New submission from Jean Abou Samra <j...@abou-samra.fr>:

Common mathematical functions such as sqrt(), exp(), etc. are available for 
decimal numbers as methods of decimal.Decimal instances (like 
https://docs.python.org/3/library/decimal.html#decimal.Decimal.exp). This does 
not pair well with the math and cmath modules as well as NumPy and SymPy which 
all define these as functions. It also makes it harder to switch to decimals 
instead of floats when you realize that your program lacks arithmetic precision.

It would be nice to have functions in the decimal module that called the 
corresponding methods. This would unify the interface with other modules while 
keeping backwards compatibility and preserving the possibility to subclass 
Decimal.

----------
components: Library (Lib)
messages: 373754
nosy: Jean Abou Samra, facundobatista, mark.dickinson, rhettinger, skrah
priority: normal
severity: normal
status: open
title: Add mathematical functions as wrapper to decimal.Decimal methods
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41315>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to