This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: class complex<FLT>


Gabriel Dos Reis wrote:

> Zoltan Nagy <Z.Nagy@atomki.hu> writes:
>
> | Hi,
> |
> | The complex specializations don't work.
>
> Please, could you expand a little bit on this?
>

I think  using the  __complex__   C extension is an extra source of the
bugs.
On the other hand you have to make a  C libriary which contains the
complex arithmetic functions.
This functions are not part of the stdc++ library. I think these are
unnecessary objects in the stdc++ library.
You can write the complex arithmetic function directly in C++ and in
this case you can use the C++ math
functions are declared in header <cmath>.

I think you should use the usual implementation of complex classes with
the following simple
data members:
value_type _M_real, _M_imag;


Zoltan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]