********************************************************************/
/*
- * 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
#include <time.h> // clock
#endif
#include <sys/time.h>
+//#include "new_new.h" /* memory tracking */
+#include "../config.h"
/////////////////////////////////////////////////////////////////////////////////////
// Arithmetics
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
/////////////////////////////////////////////////////////////////////////////////////
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)
{