aboutsummaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-28 18:45:34 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-28 18:45:34 +0200
commit8e9ae1c325533818f43efa9577d15cc17295d9ee (patch)
treecd67e9e4d1e34014186c8e426a1729fd8ef6e9f7 /src/common.h
parent22c735178dc4126295e9ce376661bf2b38d3af0f (diff)
Try to properly support remainder
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h
index 2dffe2a..6285a15 100644
--- a/src/common.h
+++ b/src/common.h
@@ -17,7 +17,8 @@
# include <stdio.h>
#endif
-#define MPQ_IS_INIT(x) (mpq_denref(x)->_mp_d != NULL)
+#define MPQ_IS_INIT(x) (mpq_denref(x)->_mp_d != NULL)
+#define MPQ_IS_WHOLE(x) (mpz_cmp_ui(mpq_denref(x), 1) == 0)
/* Some headers like <sys/param.h> may define these */
#ifdef MIN