changeset 4921:d0b8964b9d4b

[project @ 2004-07-28 15:53:46 by jwe]
author jwe
date Wed, 28 Jul 2004 15:53:46 +0000
parents b22a7a1db0d5
children cee8d88cf619
files liboctave/ChangeLog liboctave/oct-cmplx.h
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Tue Jul 27 18:16:18 2004 +0000
+++ b/liboctave/ChangeLog	Wed Jul 28 15:53:46 2004 +0000
@@ -1,3 +1,8 @@
+2004-07-28  John W. Eaton  <jwe@octave.org>
+
+	* oct-cmplx.h (pow (const Complex&, const double&):
+	Convert second arg to complex to avoid libstdc++ bug.
+
 2004-07-27  John W. Eaton  <jwe@octave.org>
 
 	* oct-inttypes.h (bitshift): New arg, MASK.
--- a/liboctave/oct-cmplx.h	Tue Jul 27 18:16:18 2004 +0000
+++ b/liboctave/oct-cmplx.h	Wed Jul 28 15:53:46 2004 +0000
@@ -112,7 +112,10 @@
 inline Complex
 pow (const Complex& z, const double& x)
 {
-  return std::pow (z, x);
+  // XXX FIXME XXX -- this should not be needed, but it avoids a bug
+  // in some versions of libstdc++ (3.3.x and possibly others).
+
+  return std::pow (z, Complex (x));
 }
 
 inline Complex