complex class for GMP?

Felix E. Klee felix.klee.gmp@gmx.net
Mon, 8 Sep 2003 00:19:22 +0200


Hi,

I'm doing a lot of complex number arithmetics with high precision floats
(the highest precision I've used so far was around 27000 bits). Now, I
wonder whether the complex class provided in the standard library is
well suited for that task. There are two issues that make me doubt it
is:
1. It doesn't use references in most of its interface and I'm worried
   that this lowers the performance. I'm also worried that the
   implementation of most libraries isn't optimized for types that use
   much memory.
2. Since it doesn't use references in its interface there seems to be no
   way to change the precision of a variable after it has been created. 
   For example real(a).set_prec(512) can't work. So I have to set the
   precision always during initialization (which is often problematic to
   achieve without using ugly pointers).

Can someone recommend an alternative complex number library that plays
nicely with GMP?

BTW, I'm using gcc 3.3 and icc 7.1 (uses the Dinkum standard library)
under SuSE LINUX 8.2.

Felix

-- 
To contact me off list don't reply but send mail to
    felix DOT klee AT inka DOT de
Otherwise your email to me might get automatically deleted!