This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

[libstdc++-v3] Typo in std_complex.h, patch included


I believe there is a typo in line 507 of std_complex.h in fuction
template<typename _Tp> inline complex<_Tp> pow(const complex<_Tp>&
__x, const complex<_Tp>& __y). The line should read return exp(__y *
log(__x)); instead of return exp(__x * log(__x));.

The following simple patch fixes the problem.

*** /home/peter/egcs/gcc/libstdc++-v3/ChangeLog~	Tue Jan  9 18:03:40 2001
--- /home/peter/egcs/gcc/libstdc++-v3/ChangeLog	Tue Jan  9 18:03:47 2001
***************
*** 1,3 ****
--- 1,6 ----
+ 2001-01-09  Peter Schmid<schmid@snake.iap.physik.tu-darmstadt.de>
+         * include/bits/std_complex.h: Fix a typo.
+ 
  2001-01-05  Benjamin Kosnik  <bkoz@redhat.com>
  
  	Fix 27_io/filebuf_members.cc

*** /home/peter/egcs/gcc/libstdc++-v3/include/bits/std_complex.h~	Tue Jan  9 17:59:05 2001
--- /home/peter/egcs/gcc/libstdc++-v3/include/bits/std_complex.h	Tue Jan  9 17:54:48 2001
*************** namespace std
*** 504,510 ****
      inline complex<_Tp>
      pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
      {
!       return exp(__x * log(__x));
      }
  
    template<typename _Tp>
--- 504,510 ----
      inline complex<_Tp>
      pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
      {
!       return exp(__y * log(__x));
      }
  
    template<typename _Tp>


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