Re: gmpy adapter - Mailing list psycopg

From Daniele Varrazzo
Subject Re: gmpy adapter
Date
Msg-id AANLkTikrscrNzt8=+b8wEHPJ1Da7h7ReCUc7BRKR6OZw@mail.gmail.com
Whole thread Raw
In response to Re: gmpy adapter  (Daniel Popowich <danielpopowich@gmail.com>)
List psycopg
On Tue, Mar 1, 2011 at 5:39 PM, Daniel Popowich
<danielpopowich@gmail.com> wrote:
>
> Daniele Varrazzo writes:
>> If cdecimal is good for you (i.e. if the decimal semantics is fine),
>> you may use mpf throughout your program instead of mpq. It is an
>> exact type (as exact as decimal of course: you can't represent all
>> the rationals) and likely to be more efficient than mpq. Plus, it
>> maps directly with the postgres decimal on I/O.
>>
>
> Really?  But it's binary floating point.  From the GMP manual,
> http://gmplib.org/manual-4.3.2/Floating_002dpoint-Functions.html:


Uhm... I think you are right. I thought mpf was more similar to a
scaled integer.

-- Daniele

psycopg by date:

Previous
From: Daniel Popowich
Date:
Subject: Re: gmpy adapter
Next
From: "Eric Snow"
Date:
Subject: problem with copy_expert on cursor