changeset 4682:994f449a1eba

[project @ 2003-12-19 15:37:14 by jwe]
author jwe
date Fri, 19 Dec 2003 15:37:14 +0000
parents bb9515a3527d
children a3a306af7292
files src/ChangeLog src/xpow.cc
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Dec 18 15:35:09 2003 +0000
+++ b/src/ChangeLog	Fri Dec 19 15:37:14 2003 +0000
@@ -1,3 +1,7 @@
+2003-12-19  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* xpow.cc (xpow (double, double)): Avoid apparent GNU libm bug.
+
 2003-12-17  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* symtab.cc (symbol_record::print_symbol_info_line):
--- a/src/xpow.cc	Thu Dec 18 15:35:09 2003 +0000
+++ b/src/xpow.cc	Fri Dec 19 15:37:14 2003 +0000
@@ -70,8 +70,13 @@
 {
   if (a < 0.0 && static_cast<int> (b) != b)
     {
+      // XXX FIXME XXX -- avoid apparent GNU libm bug by converting
+      // A and B to complex instead of just A.
+
       Complex atmp (a);
-      return pow (atmp, b);
+      Complex btmp (b);
+
+      return pow (atmp, btmp);
     }
   else
     return pow (a, b);