Newbie question

Marc Glisse marc.glisse at normalesup.org
Tue Jun 9 00:35:17 CEST 2009


On Mon, 8 Jun 2009, jmonetti at uncu.edu.ar wrote:

> I'm trying gmd and have a simple question.  I've the following
> c code
> ...
>    v2 = A[0][1] * ((2-h)/(2+h))   + A[1][1] * (2+h);
> ...
>
> The matrix elements, 'v2' and 'h' are "doubles".
> I need more precision when calculating this equation, so
> started trying gmp.
>
> The problem I found is that cannot express the equation
> in a single line with gmp.  Is it right ?

That is what C++ is for. With gmpxx, the line you are showing doesn't need 
any modification, assuming A, h and v2 were declared appropriately.

-- 
Marc Glisse


More information about the gmp-discuss mailing list