From ceb375c0835e2d501550e1f1228184662415ef8e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 13 Dec 2025 13:44:11 -0500 Subject: More approximate, but more functional implementation. --- src/stdlib/bigint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdlib/bigint.h') diff --git a/src/stdlib/bigint.h b/src/stdlib/bigint.h index b57844a4..5bf33629 100644 --- a/src/stdlib/bigint.h +++ b/src/stdlib/bigint.h @@ -137,7 +137,7 @@ MACROLIKE Int_t Int$modulo1(Int_t x, Int_t y) { } MACROLIKE Int_t Int$left_shifted(Int_t x, Int_t y) { - if likely (x.small & y.small & 1L) { + if likely (x.small & y.small & 1L & ((y.small >> 2L) < 30)) { const int64_t z = ((x.small >> 2L) << (y.small >> 2L)) << 2L; if likely (z == (int32_t)z) return (Int_t){.small = z + 1L}; } -- cgit v1.2.3