On Mon, 6 Dec 2004, Gabriel Dos Reis wrote:
> > As a matter of fact, the implementation of <complex> is criticized, > once in a while, because it does NOT use the grammar school rule you > present above. However, for float, double, long double it specializes > to __complex__ T which is what the compiler uses to implement complex > numbers in C99 and Fortran. So, the problem is a compiler problem not > libstdc++ problem. I have testet my program with a 2.95 and several 3.x versionsions of gcc. The lastet version I have is 3.3.3. All versions gave the same result. What was the critice you mentioned above? I can not imagine a sitation in which I would need the naive implementation. But I think it can not be good that if I get different result for complex and real arithmetic. If the number are the same real numbers. > > Did you look at the actual implementation? > As you mentinon it if have missed the specilization at the end of std_complex.h. Sorry. I still think that we should have and other implementation for complex<floating_point>, but I cannot change the code of __complex__ T in the complier. Yours Andreas Klein