From: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> |
---|---|
To: | Daniel Popowich <danielpopowich(at)gmail(dot)com> |
Cc: | psycopg(at)postgresql(dot)org |
Subject: | Re: gmpy adapter |
Date: | 2011-03-01 22:56:58 |
Message-ID: | AANLkTikrscrNzt8=+b8wEHPJ1Da7h7ReCUc7BRKR6OZw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | psycopg |
On Tue, Mar 1, 2011 at 5:39 PM, Daniel Popowich
<danielpopowich(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Eric Snow | 2011-03-02 21:20:34 | problem with copy_expert on cursor |
Previous Message | Daniel Popowich | 2011-03-01 17:39:33 | Re: gmpy adapter |