Wrapping::wrapping_shl
fn wrapping_shl(S a, int n) -> S Import
Source: use arith::{Wrapping}; src/arith.hy a << (n & 63): the count is taken modulo 64.
Parameters#
| Name | Type |
|---|---|
a | S |
n | int |
Returns#
S
See also#
Wrapping: Integer arithmetic that wraps around modulo 2^64 instead of panicking.Wrapping::wrapping_add:a + bmodulo 2^64.Wrapping::wrapping_sub:a - bmodulo 2^64.Wrapping::wrapping_mul:a * bmodulo 2^64.Wrapping::wrapping_neg:-amodulo 2^64 (INT_MINstaysINT_MIN).Wrapping::wrapping_pow:a ** expmodulo 2^64.Wrapping::wrapping_shr:a >> (n & 63): the count is taken modulo 64.