#include "mini-gmp.h"
-#if !defined(MINI_GMP_DONT_USE_FLOAT_H)
+#ifndef MINI_GMP_ENABLE_FLOAT
+#define MINI_GMP_ENABLE_FLOAT 1
+#endif
+
+#if MINI_GMP_ENABLE_FLOAT
#include <float.h>
#endif
}
\f
+#if MINI_GMP_ENABLE_FLOAT
/* Conversions and comparison to double. */
void
mpz_set_d (mpz_t r, double x)
return mpz_cmpabs_d (x, d);
}
}
+#endif /* MINI_GMP_ENABLE_FLOAT */
\f
/* MPZ comparisons and the like. */
#include "mini-mpq.h"
+#ifndef MINI_GMP_ENABLE_FLOAT
+#define MINI_GMP_ENABLE_FLOAT 1
+#endif
+
#ifndef GMP_LIMB_HIGHBIT
/* Define macros and static functions already defined by mini-gmp.c */
#define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT)
}
\f
+#if MINI_GMP_ENABLE_FLOAT
/* MPQ to/from double. */
void
mpq_set_d (mpq_t r, double x)
return ret;
}
-
+#endif /* MINI_GMP_ENABLE_FLOAT */
\f
/* MPQ and strings/streams. */
char *