Skip to content

Vector Arithmetic ​

These instructions perform element-wise arithmetic on arrays.

OpcodeArgumentsOperands (stack)Description
addvtypeleft, rightReplaces two equal-length numeric arrays with an array of element-wise sums in the selected type.
subvtypeleft, rightReplaces two equal-length numeric arrays with an array of left[i] - right[i] in the selected type.
mulvtypeleft, rightReplaces two equal-length numeric arrays with an array of element-wise products in the selected type.
divvtypeleft, rightReplaces two equal-length numeric arrays with an array of left[i] / right[i] in the selected type.
modvtypeleft, rightReplaces two equal-length numeric arrays with an array of element-wise remainders in the selected type.
negvtypevaluesReplaces one numeric array with an equal-length array containing each element's negation in the selected type.