This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients facundobatista, mark.dickinson, rhettinger, skrah
Date 2010-05-22.11:24:02
SpamBayes Score 0.08276479
Marked as misclassified No
Message-id <1274527444.86.0.497273010341.issue8786@psf.upfronthosting.co.za>
In-reply-to
Content
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)


[Mark Dickinson]
> Rather that complicating the Context constructor, I'd prefer a separate factory
> function.  I was thinking of something like:
>
> def IEEEContext(n):
>     """Return the decimal<n> IEEE 754 context.  n should be a multiple
>        of 32."""
>     ...
>
> Again, it's clear with this that you get a new context object (I agree that 
> there are problems with (1) and the mutability of Contexts).

I like that, too. Where do you find the "multiple of 32" in the standard?
In a draft of IEEE 754, I only see:

Table 2—Interchange format parameters defining floating-point numbers:

  storage format: decimal32

  basic format: decimal64 and decimal128


This is what Java and decNumber offer.
History
Date User Action Args
2010-05-22 11:24:05skrahsetrecipients: + skrah, rhettinger, facundobatista, mark.dickinson
2010-05-22 11:24:04skrahsetmessageid: <1274527444.86.0.497273010341.issue8786@psf.upfronthosting.co.za>
2010-05-22 11:24:03skrahlinkissue8786 messages
2010-05-22 11:24:02skrahcreate