Complex numbers using mpfr_class
marc_durufle at yahoo.fr
Fri Dec 16 14:58:06 CET 2005
I have some little problems when i use complex numbers
like that :
typedef complex<mpfr_class> Complex_wp;
The main problem is that i can't declare :
because the imaginary part of c will not be
initialized, the imaginary part of c is equal to NaN.
The only way, I find to solve this problem is to put :
But, i am very confused because i use template
functions (for real or complex numbers), and for real
numbers, this syntax is incorrect. So i would know if
there is a way to solve my problem, with keeping the
compatibility with real numbers.
I asked my-self, if it is not a problem of the
standard complex class, which doesn't allow to
initialize a complex number with only one integer
It is amazing because with the standard double class
it works very well, and i never met a nan in this
case. So there is a compatibility problem between gmp
and standard complex class, no ?
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
More information about the gmp-bugs