diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-16 13:13:35 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-16 13:13:35 -0400 |
| commit | 436c6d445749a887c76e514867aaad7d6afbc679 (patch) | |
| tree | 4dc3fd8f791d60d980e47b469f511de69327bc83 /builtins | |
| parent | 2d3c114435e6b6ade1151edf22592ca7d298e17a (diff) | |
Bugfix
Diffstat (limited to 'builtins')
| -rw-r--r-- | builtins/integers.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtins/integers.h b/builtins/integers.h index 05085175..d3a9546b 100644 --- a/builtins/integers.h +++ b/builtins/integers.h @@ -128,9 +128,9 @@ static inline Int_t Int$times(Int_t x, Int_t y) { static inline Int_t Int$divided_by(Int_t x, Int_t y) { if (__builtin_expect(((x.small & y.small) & 1) != 0, 1)) { - const int64_t z = 4*(x.small>>1) / (y.small>>1); + const int64_t z = ((x.small>>1) / (y.small>>1)) << 2; if (__builtin_expect(z == (int32_t)z, 1)) - return (Int_t){.small=z+1}; + return (Int_t){.small=z|1}; } return Int$slow_divided_by(x, y); } |
