diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-28 18:45:34 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-28 18:45:34 +0200 |
commit | 8e9ae1c325533818f43efa9577d15cc17295d9ee (patch) | |
tree | cd67e9e4d1e34014186c8e426a1729fd8ef6e9f7 /src/common.h | |
parent | 22c735178dc4126295e9ce376661bf2b38d3af0f (diff) |
Try to properly support remainder
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 3 |
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 |