diff options
Diffstat (limited to 'stdlib/source/lux/math/number/int.lux')
-rw-r--r-- | stdlib/source/lux/math/number/int.lux | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/stdlib/source/lux/math/number/int.lux b/stdlib/source/lux/math/number/int.lux index ec4df8389..e43c5eb89 100644 --- a/stdlib/source/lux/math/number/int.lux +++ b/stdlib/source/lux/math/number/int.lux @@ -251,3 +251,9 @@ (def: &equivalence ..equivalence) (def: hash .nat)) + +(def: #export (right_shift parameter subject) + {#.doc "Signed/arithmetic bitwise right-shift."} + (-> Nat Int Int) + (//i64.or (//i64.and //i64.sign subject) + (//i64.right_shift parameter subject))) |