diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-04 21:22:03 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-04 21:22:03 -0400 |
| commit | 3a556296b68ded68c9fcefa1c60e34d1eff40fa7 (patch) | |
| tree | 658db57ce2c477d13cf607b1878e2ed5e2a68c92 /builtins/integers.h | |
| parent | 00543b4e876cf069d5be22c1f06427a4c8d5bed9 (diff) | |
Add Text:repeat()
Diffstat (limited to 'builtins/integers.h')
| -rw-r--r-- | builtins/integers.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/builtins/integers.h b/builtins/integers.h index e24b7869..4ff862fc 100644 --- a/builtins/integers.h +++ b/builtins/integers.h @@ -257,6 +257,13 @@ static inline Int_t Int$negative(Int_t x) return Int$slow_negative(x); } +static inline bool Int$is_negative(Int_t x) +{ + if (__builtin_expect((x.small & 1), 1)) + return x.small < 0; + return Int$compare_value(x, I_small(0)) < 0; +} + // Conversion functions: static inline Int_t Int64_to_Int(int64_t i) |
