wrapping_sub

Function wrapping_sub 

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