[issue8540] Make Context._clamp public in decimal module

Stefan Krah report at bugs.python.org
Tue Apr 27 16:07:41 CEST 2010


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

I'd prefer to drop the ExtendedContext completely. Reasons are:

  1) _clamp, prec, emin and emax aren't set to IEEE754 values.

  2) The use of 'extended' is decNumber specific (see
     http://speleotrove.com/decimal/dncont.html ). In IEEE754
     'extended' has yet another meaning (AFAICS).


I can see that it is awkward to remove it, but if there's consensus
I'd be willing to work on a patch.

Making clamp visible sounds fine to me. (Personally, I'd rather have
capitals non-visible.)

If we make Decimal{32,64,128} contexts available, we should document exactly how the arithmetic deviates from IEEE754.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8540>
_______________________________________


More information about the Python-bugs-list mailing list