[issue7049] decimal.py: Three argument power issues

2011-11-19 Thread Mark Dickinson
Mark Dickinson added the comment: Closing as won't fix. Even deprecation doesn't seem worth the effort here. -- resolution: -> wont fix status: open -> closed ___ Python tracker __

[issue7049] decimal.py: Three argument power issues

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for deprecating three-arg pow for the reasons given. A user is much better-off composing well-defined operations than using our short-cut, with our chosen assumptions. Apologies for taking so long to think this one through. -- assignee: rhettinger

[issue7049] decimal.py: Three argument power issues

2010-02-22 Thread Mark Dickinson
Mark Dickinson added the comment: Well, the real problem is that powmod doesn't really belong in the decimal module at all. It's not a natural primitive arithmetic operation; it's certainly not naturally a floating-point operation; nothing like this appears in any floating-point standard tha

[issue7049] decimal.py: Three argument power issues

2010-02-22 Thread Stefan Krah
Stefan Krah added the comment: I've tried to pinpoint exactly what I don't like about the current behavior, and the main reason is that it violates my mental model of how the functions in the specification generally behave: 1) Functions take arbitrary precision input. 2) Functions try to prese

[issue7049] decimal.py: Three argument power issues

2010-02-22 Thread Mark Dickinson
Mark Dickinson added the comment: I've fixed the docs to accurately describe three-argument pow results (the exponent in particular) in r78312 through r78315. -- ___ Python tracker

[issue7049] decimal.py: Three argument power issues

2010-02-22 Thread Mark Dickinson
Mark Dickinson added the comment: The ideal exponent for three-argument pow should definitely be zero. You're returning what's essentially an integer, loosely disguised as a decimal instance. -- ___ Python tracker

[issue7049] decimal.py: Three argument power issues

2010-02-22 Thread Stefan Krah
Stefan Krah added the comment: This is a very loosely related issue, but I think it fits in here. To be consistent with the documentation, the three argument power should use the ideal exponent: >>> c = getcontext() >>> c.prec = 400 >>> Decimal('1E400') % Decimal('1123123E5') Decimal('8.45074E+