This is the mail archive of the libstdc++@gcc.gnu.org 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]
Other format: [Raw text]

optimization of complex multiplication as of gcc 4.0.1


I would like to know whether the multiplication of two complex numbers, one of which being actually a real number, e.g.
std::complex<double> a(1,0);
std::complex<double> b(1,1.2);
std::cout << a*b << std::endl;
is optimised to save the trivial multiplications 0*1.2 and 0*1 (in my example) and the subsequent addition and subtraction.



Luc Bourhis Research Assistant Chemical Crystallography Laboratory University of Durham, UK


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