wrapping_sub

Function wrapping_sub 

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