JWS-112 Bumping version of ClustalO (src, binaries and windows) to version 1.2.4.
[jabaws.git] / binaries / src / clustalo / src / hhalign / util-C.h
index b422f35..f3031f0 100644 (file)
@@ -15,7 +15,7 @@
  ********************************************************************/
 
 /*
- * RCS $Id: util-C.h 155 2010-11-17 12:18:47Z fabian $
+ * RCS $Id: util-C.h 316 2016-12-16 16:14:39Z fabian $
  */
 
 // Utility subroutines
@@ -29,6 +29,8 @@
 #include <time.h>     // clock
 #endif
 #include <sys/time.h>
+//#include "new_new.h" /* memory tracking */
+#include "../config.h"
 
 /////////////////////////////////////////////////////////////////////////////////////
 // Arithmetics
@@ -50,8 +52,11 @@ inline int iround(double x) {return int(floor(x+0.5));}
 inline double fmean(double x, double y, double d) { return pow( (pow(x,d)+pow(y,d))/2 ,1./d);}
 
 // log base 2
-inline float log2(float x)  {return (x<=0? (float)(-100000):1.442695041*log(x));}
-inline float log10(float x) {return (x<=0? (float)(-100000):0.434294481*log(x));}
+//#ifndef CLUSTAL_OMEGA_HAVE_LOG2
+//#ifndef HAVE_LOG2
+inline float Log2(float x)  {return (x<=0? (float)(-100000):1.442695041*log(x));}
+inline float Log10(float x) {return (x<=0? (float)(-100000):0.434294481*log(x));}
+//#endif
 
 
 /////////////////////////////////////////////////////////////////////////////////////
@@ -242,7 +247,7 @@ inline float NormalizeToX(float* array, int length, float x, float* def_array=NU
 inline char* sprintg(float val, int w)
 {
   static char str[100];
-  float log10val = log10(fabs(val));
+  float log10val = Log10(fabs(val));
   int neg = (val<0? 1: 0);
   if (log10val >= w-neg-1 || -log10val > 3) 
     {