extern_spec_i128_overflowing_mul

Function extern_spec_i128_overflowing_mul 

Source
pub fn extern_spec_i128_overflowing_mul(self_: i128, rhs: i128) -> (i128, bool)
Expand description

extern spec for i128::overflowing_mul

This is not a real function: its only use is for documentation.

terminates

ghost

ensures

(self@ $op rhs@) >= $type::MIN@ && (self@ $op rhs@) <= $type::MAX@
                    ==> result.0@ == (self@ $op rhs@)

ensures

exists<k: Int> result.0@ == (self@ $op rhs@) + k * ($type::MAX@ - $type::MIN@ + 1)

ensures

result.1 == ((self@ $op rhs@) < $type::MIN@ || (self@ $op rhs@) > $type::MAX@)