[Python-ideas] Python Numbers as Human Concept Decimal System

Stefan Krah stefan at bytereef.org
Thu Mar 6 16:49:04 CET 2014


Oscar Benjamin <oscar.j.benjamin at ...> writes:
> On 6 March 2014 12:36, Stefan Krah <stefan at ...> wrote:
> > Regarding decimal literals:
> >
> > Possible in 3.x, but it would require some investigation if
> > people really want arbitrary precision arithmetic by default
> > rather than e.g. IEEE Decimal64.
> 
> Interesting. I wasn't aware of Decimal64.
> 
> I don't understand your question/point though. The Decimal module
> doesn't provide "arbitrary" precision arithmetic by default. It
> provides 28 digit precision arithmetic by default. It does however
> allow the creation of Decimal instances with effectively arbitrary
> precision from strings, integers etc.

Well, yes. You can also emulate Decimal64 with the appropriate
context parameters.

I meant "arbitrary precision facilities by setting context parameters",
but probably many people want to keep those.

Due to the compact representation (bid64 or bid128), Decimal64 or
Decimal128 would be interesting for doing arithmetic on huge matrices. 


Stefan Krah






More information about the Python-ideas mailing list