Skip to main content

rotate_right

Function rotate_right 

Source
pub open spec fn rotate_right(x: u128, n: u32) -> u128
Expand description
{
    let r = n % 128u32;
    if r == 0 { x } else { (x >> r) | (x << ((128u32 - r) as u32)) }
}

The bits of x shifted right by n % BITS, with the bits shifted out of the bottom moved into the top.