Function vstd::atomic::wrapping_sub_i8
source · pub open spec fn wrapping_sub_i8(a: int, b: int) -> int
Expand description
{
if a - b > (<i8>::MAX as int) {
a - b - ((<i8>::MAX as int) - (<i8>::MIN as int) + 1)
} else if a - b < (<i8>::MIN as int) {
a - b + ((<i8>::MAX as int) - (<i8>::MIN as int) + 1)
} else {
a - b
}
}