This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] libstdc++/4622 complex::operator/=
- To: gcc-patches at gcc dot gnu dot org
- Subject: [v3] libstdc++/4622 complex::operator/=
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Wed, 31 Oct 2001 00:42:59 -0800
Gaby approved this last week. A test case entry would be nice for
this, but oh well.
tested x86/linux
2001-10-31 Edward E. Meyer <edward.e.meyer@boeing.com>
libstdc++/4622
* include/bits/std_complex.h (complex::operator/=): Correct sign.
Index: include/bits/std_complex.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/std_complex.h,v
retrieving revision 1.19
diff -c -p -r1.19 std_complex.h
*** std_complex.h 2001/10/19 18:39:00 1.19
--- std_complex.h 2001/10/31 08:41:16
*************** namespace std
*** 237,243 ****
{
const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag();
const _Tp __n = norm(__z);
! _M_imag = (_M_real * __z.imag() - _M_imag * __z.real()) / __n;
_M_real = __r / __n;
return *this;
}
--- 237,243 ----
{
const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag();
const _Tp __n = norm(__z);
! _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
_M_real = __r / __n;
return *this;
}