diff src/xpow.cc @ 4790:91a84c9bdadb

[project @ 2004-02-19 20:15:17 by jwe]
author jwe
date Thu, 19 Feb 2004 20:15:18 +0000
parents 994f449a1eba
children deed800e7bef
line wrap: on
line diff
--- a/src/xpow.cc
+++ b/src/xpow.cc
@@ -565,8 +565,14 @@
 	for (int i = 0; i < nr; i++)
 	  {
 	    OCTAVE_QUIT;
+      
+	    // XXX FIXME XXX -- avoid apparent GNU libm bug by
+	    // converting A and B to complex instead of just A.
+
 	    Complex atmp (a (i, j));
-	    result (i, j) = pow (atmp, b);
+	    Complex btmp (b);
+
+	    result (i, j) = pow (atmp, btmp);
 	  }
 
       retval = result;
@@ -937,8 +943,14 @@
       for (int i = 0; i < a.length (); i++)
 	{
 	  OCTAVE_QUIT;
-	  Complex atmp (a(i));
-	  result(i) = pow (atmp, b);
+
+	  // XXX FIXME XXX -- avoid apparent GNU libm bug by
+	  // converting A and B to complex instead of just A.
+
+	  Complex atmp (a (i));
+	  Complex btmp (b);
+
+	  result(i) = pow (atmp, btmp);
 	}
 
       retval = result;