aboutsummaryrefslogtreecommitdiff
path: root/builtins/integers.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-13 01:43:46 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-13 01:43:46 -0400
commit21fd5c8195be5faf20d8bc7ce3ba6cd8d26c8b29 (patch)
tree6ef75ed164cc8bf63e97a90fea3d8c827d245d48 /builtins/integers.c
parentd08f795794b33a5d52e39c6b9f0c4e6e88fede3d (diff)
Bugfixes
Diffstat (limited to 'builtins/integers.c')
-rw-r--r--builtins/integers.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtins/integers.c b/builtins/integers.c
index 8bc66172..d087cd39 100644
--- a/builtins/integers.c
+++ b/builtins/integers.c
@@ -49,8 +49,12 @@ public int32_t Int$compare(const Int_t *x, const Int_t *y, const TypeInfo *type)
}
public int32_t Int$compare_value(const Int_t x, const Int_t y) {
- if (__builtin_expect(((x.small & y.small) & 1) == 0, 0))
+ CORD_printf("comparing values %r vs %r\n", Int$as_text(&x, true, NULL), Int$as_text(&y, true, NULL));
+ printf("comparing values %p vs %p\n", x.big, y.big);
+ if (__builtin_expect(((x.small & y.small) & 1) == 0, 0)) {
+ printf("MPZ comparing\n");
return mpz_cmp(*x.big, *y.big);
+ }
return (x.small > y.small) - (x.small < y.small);
}