std_complex.h (complex::operator/=): Correct sign.

2001-10-31  Edward E. Meyer  <edward.e.meyer@boeing.com>

	libstdc++/4622
	* include/bits/std_complex.h (complex::operator/=): Correct sign.

From-SVN: r46675
This commit is contained in:
Edward E. Meyer 2001-10-31 08:45:57 +00:00 committed by Benjamin Kosnik
parent 9a304d1766
commit 51ad6d81f4
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,12 @@
2001-10-31 Edward E. Meyer <edward.e.meyer@boeing.com>
libstdc++/4622
* include/bits/std_complex.h (complex::operator/=): Correct sign.
2001-10-30 Paolo Carlini <pcarlini@unitus.it>
Benjamin Kosnik <bkoz@redhat.com>
libstdc++/4354
* include/bits/basic_string.h: Tweaks.
* include/bits/basic_string.tcc (string::_M_replace(iterator,
iterator, _ForwardIter, _ForwardIter, forward_iterator_tag): Fix.

View File

@ -237,7 +237,7 @@ namespace std
{
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_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
_M_real = __r / __n;
return *this;
}