Function typed_sub

Source
pub fn typed_sub(
    x: &MaybeRelocatable,
    y: &MaybeRelocatable,
    opcode_extension: OpcodeExtension,
) -> Result<MaybeRelocatable, VirtualMachineError>
Expand description

Substracts two MaybeRelocatable values according to the specified OpcodeExtension and returns the result as a MaybeRelocatable value. If the OpcodeExtension is Stone it subtracts them as MaybeRelocatable::sub does. If the OpcodeExtension is QM31Operation it requires them both to be Int and it subtracts them as packed reduced QM31 elements.