complex class for GMP?

Niels Möller
11 Sep 2003 08:56:05 +0200

"Felix E. Klee" <> writes:

> I just thought about it. The no-reference problem might not be too much
> of a performance penalty since __mpf_struct isn't that large and the
> limbs are, of course, not copied (stupid me, I didn't think of that
> originally).

But on the other hand, copying the structs around is no good if the
limbs are realloced (or even worse, freed), because then only the
pointers in one of the copies will be updated to point to the new limb
area. Might still work if you have a fix precision for your numbers.
(I'm not very familiar with mpf, so I don't know exactly when it calls