[Python-Dev] PEP 3188: Implementation Questions

Thomas Heller theller at ctypes.org
Sat Feb 27 18:20:01 CET 2010


Meador Inge schrieb:
> On Fri, Feb 26, 2010 at 4:08 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:
> 
>> Meador Inge wrote:
>>
>>  3. Using Decimal keeps the desired precision,
>>>
>>
>> Well, sort of, but then you end up doing arithmetic in
>> decimal instead of binary, which could give different
>> results.
>>
> 
> Even with the user-defined precision capabilities of the 'Decimal' class?
> In other words, can I create an instance of a 'Decimal' that behaves (in all
> operations: arithmetic, comparison, etc...) exactly as the extended double
> precision type offered by a given machine?
> 
> Maybe the solution is to give ctypes long double objects
>> the ability to do arithmetic?
>>
> 
> Maybe, but then we would have to give all numeric 'ctypes' the ability to do
> arithmetic -- which may be more than we want.

See issue 887237:

http://bugs.python.org/issue887237

-- 
Thanks,
Thomas



More information about the Python-Dev mailing list