Base class for arithmetic tools.
a: a numeric (scalar) value, matrix or tensor.
b: a numeric (scalar) value, matrix or tensor.
If both a and b are non-scalar (matrix or tensor), their dimensions must be the same.
result: If both inputs are scalar, the output is a scalar value. If either of the inputs is non-scalar, the output is of the same type as the inputs (i.e. either a matrix or tensor). If one input is scalar and the other input is non-scalar, the output is non-scalar and the values are determined by adding up each element of the non-scalar input to the scalar input. The number format will be expanded so that there is no loss of accuracy. For example, adding an integer to a floating point number returns a floating point number.