diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2026-01-01 15:18:47 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2026-01-01 15:18:47 -0500 |
| commit | 6afa2aefebc13d51e24cbde10fc7e98b6140e740 (patch) | |
| tree | 521d02e698fd274568c7a06ec21cdb372a5f7bb2 /src | |
| parent | 4733b42cd4013f679c7bcf0097a8a06f2a91d419 (diff) | |
| parent | ce49f93da58d007c0a52ee82e2421adfe06012f9 (diff) | |
Merge branch 'dev' into static-dependencies
Diffstat (limited to 'src')
| -rw-r--r-- | src/stdlib/bigint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/bigint.c b/src/stdlib/bigint.c index f36cbe6a..7af1fa32 100644 --- a/src/stdlib/bigint.c +++ b/src/stdlib/bigint.c @@ -110,8 +110,8 @@ static bool Int$is_none(const void *i, const TypeInfo_t *info) { public PUREFUNC int32_t Int$compare_value(const Int_t x, const Int_t y) { if (likely(x.small & y.small & 1L)) return (x.small > y.small) - (x.small < y.small); - else if (x.small & 1) return -mpz_cmp_si(Int_mpz(y), x.small); - else if (y.small & 1) return mpz_cmp_si(Int_mpz(x), y.small); + else if (x.small & 1) return -mpz_cmp_si(Int_mpz(y), (x.small >> 2)); + else if (y.small & 1) return mpz_cmp_si(Int_mpz(x), (y.small >> 2)); else return x.big == y.big ? 0 : mpz_cmp(Int_mpz(x), Int_mpz(y)); } |
