wrapping_add

Function wrapping_add 

Source
pub open spec fn wrapping_add(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
    }
}