#ifndef GMX_MATH_UTILITIES_H
#define GMX_MATH_UTILITIES_H
-#include "../legacyheaders/types/simple.h"
+#include <limits.h>
+#include <math.h>
+
+#include "gromacs/utility/basedefinitions.h"
+#include "gromacs/utility/real.h"
#ifdef __cplusplus
extern "C" {
int
gmx_numzero(double a);
-/*! \brief Compute logarithm to base 2
+/*! \brief Compute floor of logarithm to base 2
*
* \return log2(x)
*/
-real
-gmx_log2(real x);
+unsigned int
+gmx_log2i(unsigned int x);
-/*! /brief Multiply two large ints
+/*! \brief Multiply two large ints
*
- * \return False iff overflow occured
+ * \return False iff overflow occured
*/
gmx_bool
check_int_multiply_for_overflow(gmx_int64_t a,