changeset 52:9eda1009cf95

[project @ 1993-08-11 21:05:59 by jwe]
author jwe
date Wed, 11 Aug 1993 21:05:59 +0000
parents 7806354a10d3
children 4565ad8b4697
files src/expm.cc
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/expm.cc
+++ b/src/expm.cc
@@ -60,7 +60,7 @@
 extern int empty_arg (tree_constant&);
 
 tree_constant
-matrix_exp (const tree_constant& a)
+matrix_exp (tree_constant& a)
 {
   tree_constant retval;
   tree_constant tmp = a.make_numeric ();
@@ -132,12 +132,12 @@
 					 fortran_vec (), &n_cols,
 					 work.fortran_vec ());
 
-	    sqpow = 1.0 + log (inf_norm) / log (2.0);
+	    sqpow = (int) (1.0 + log (inf_norm) / log (2.0));
 
 // Check whether we need to square at all.
 
-	    if (sqpow <= 0.0)
-	      sqpow = 0.0;
+	    if (sqpow < 0)
+	      sqpow = 0;
 	    else
 	      {
 		for (inf_norm = 1.0, i = 0; i < sqpow; i++)
@@ -235,12 +235,12 @@
 					 m.fortran_vec (), &n_cols,
 					 work.fortran_vec ());
 
-	    sqpow = 1.0 + log (inf_norm) / log (2.0);
+	    sqpow = (int) (1.0 + log (inf_norm) / log (2.0));
 
 // Check whether we need to square at all.
 
-	    if (sqpow <= 0.0)
-	      sqpow = 0.0;
+	    if (sqpow < 0)
+	      sqpow = 0;
 	    else
 	      {
 		for (inf_norm = 1.0, i = 0; i < sqpow; i++)