wrapping_sub

Function wrapping_sub 

Source
pub open spec fn wrapping_sub(x: i64, y: i64) -> i64
Expand description
{
    if x - y > <i64>::MAX {
        (x - y - 0x1_0000_0000_0000_0000) as i64
    } else if x - y < <i64>::MIN {
        (x - y + 0x1_0000_0000_0000_0000) as i64
    } else {
        (x - y) as i64
    }
}