Arithmetic

The arithmetic operators provide basic math between two operands.

There are three available combinations of operands. The simplest is between two scalars, which will return a scalar after applying the chosen arithmetic operator. We can also combine an instant vector and a scalar, which will apply the chosen arithmetic operator between the scalar and each sample of the instant vector, effectively returning the same instant vector with updated samples. The last combination we can have is between two instant vectors. In this case, the arithmetic operator is applied between the vector from the left-hand side and the matching element from the right-hand side vector, while the metric name is dropped. If no match is present, those samples will not be part of the result. This case will be explained further in the Vector matching section.

For reference, the available arithmetic operators are as follows:

Operator

Description

+

Addition

-

Subtraction

*

Multiplication

/

Division

%

Modulo

^

Power

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.31.209