[issue8786] Add support for IEEE 754 contexts to decimal module.

2013-08-30 Thread Stefan Krah
Stefan Krah added the comment: BTW, in _decimal the feature can already be enabled with: ./configure CFLAGS=-DEXTRA_FUNCTIONALITY >>> IEEEContext(DECIMAL128) Context(prec=34, rounding=ROUND_HALF_EVEN, Emin=-6143, Emax=6144, capitals=1, clamp=1, flags=[], traps=[]) >>> IEEEContext(DECIMAL64) C

[issue8786] Add support for IEEE 754 contexts to decimal module.

2013-07-07 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue8786] Add support for IEEE 754 contexts to decimal module.

2012-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: I do not think IEEEContext should not be made a class rather than a function until it really *is* a subclass with altered or added behavior. This means at least its own __str__ method and in this case, a __setattr__ that enforces the invariants. Here that mean

[issue8786] Add support for IEEE 754 contexts to decimal module.

2012-10-14 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.4 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8786] Add support for IEEE 754 contexts to decimal module.

2012-09-18 Thread Michele OrrĂ¹
Michele OrrĂ¹ added the comment: Something like this? That's a pretty trivial draft for the patch. About "byte sequences", those features should be available using builtins bin(), oct() and hex(), hacking on __index__, or with internal methods? I am lacking imagination, what else there should b

[issue8786] Add support for IEEE 754 contexts to decimal module.

2010-05-22 Thread Mark Dickinson
Mark Dickinson added the comment: Thinking ahead a bit: at some point we might well also want functions to pack and unpack these IEEE formats into byte sequences, using the bit representations described in the standard. A natural place for those functions would be as methods on a Context obj

[issue8786] Add support for IEEE 754 contexts to decimal module.

2010-05-22 Thread Mark Dickinson
Changes by Mark Dickinson : -- components: +Library (Lib) stage: -> needs patch type: -> feature request ___ Python tracker ___ ___ P

[issue8786] Add support for IEEE 754 contexts to decimal module.

2010-05-22 Thread Stefan Krah
Stefan Krah added the comment: Mark Dickinson wrote: > It's Table 3.6 ("Decimal interchange format parameters") in the final version > of IEEE 754; Thanks! I think this is not in the draft I have. +1 for IEEEContext(n). Could we have module constants Decimal32, Decimal64 and Decimal128 so th

[issue8786] Add support for IEEE 754 contexts to decimal module.

2010-05-22 Thread Mark Dickinson
Mark Dickinson added the comment: It's Table 3.6 ("Decimal interchange format parameters") in the final version of IEEE 754; I'm not sure what that corresponds to in the various drafts. It has column headings: "decimal32", "decimal64", "decimal128" and "decimal{k} (k >= 32)". Parameters fo

[issue8786] Add support for IEEE 754 contexts to decimal module.

2010-05-22 Thread Stefan Krah
Stefan Krah added the comment: Some context from issue 8540: [Stefan Krah] > I'm busy implementing the IEEE754 contexts for cdecimal. To keep things > in sync, it would be nice to agree how they should be created. > > > Suggestions: > > 1) c = Decimal64Context > > 2) c = Context(Decimal64) [M

[issue8786] Add support for IEEE 754 contexts to decimal module.

2010-05-22 Thread Mark Dickinson
New submission from Mark Dickinson : Discussion migrated from issue 8540 into its own issue. For ease of communication with other libraries, it would be good to be able to easily create contexts corresponding to the IEEE 754 (2008) decimal interchange formats. -- messages: 106294 nosy