rightArithShift.md (1125B)
1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. --> 2 3 # Function rightArithShift 4 5 Bitwise right arithmetic shift of a value x by y number of bits, `x >> y`. 6 For matrices, the function is evaluated element wise. 7 For units, the function is evaluated on the best prefix base. 8 9 10 ## Syntax 11 12 ```js 13 math.rightArithShift(x, y) 14 ``` 15 16 ### Parameters 17 18 Parameter | Type | Description 19 --------- | ---- | ----------- 20 `x` | number | BigNumber | Array | Matrix | Value to be shifted 21 `y` | number | BigNumber | Amount of shifts 22 23 ### Returns 24 25 Type | Description 26 ---- | ----------- 27 number | BigNumber | Array | Matrix | `x` sign-filled shifted right `y` times 28 29 30 ### Throws 31 32 Type | Description 33 ---- | ----------- 34 35 36 ## Examples 37 38 ```js 39 math.rightArithShift(4, 2) // returns number 1 40 41 math.rightArithShift([16, -32, 64], 4) // returns Array [1, -2, 3] 42 ``` 43 44 45 ## See also 46 47 [bitAnd](bitAnd.md), 48 [bitNot](bitNot.md), 49 [bitOr](bitOr.md), 50 [bitXor](bitXor.md), 51 [rightArithShift](rightArithShift.md), 52 [rightLogShift](rightLogShift.md)