How to get decimal form of largest known prime?

Tim Peters tim.peters at gmail.com
Thu Jun 17 05:11:49 CEST 2004


[Tim Peters]
>> There should be a standard Decimal type in 2.4, but there won't be a C
>> interface at first (it's pure Python code -- in Python CVS
>> sandbox/decimal/).

[M.-A. Lemburg]
> Will it be turned into a C implementation at some point ?

I hope so, but that depends on volunteers appearing to do the work. 
This is a Python implementation of IBM's proposed standard for decimal
arithmetic:

   http://www2.hursley.ibm.com/decimal/

and is quite an involved piece of work.  The integration with Python
will be weak at first, and it's probably more important to work on
that.  For example, the builtin round() function won't know what to do
with Decimal instances, and neither will float format codes (e.g.,
'"%10.3f" % some_Decimal' won't work in a reasonable way at first). 
Involved as it already is, it's just a start at a complete numeric
facility.




More information about the Python-list mailing list