Arithmetic on variables?

Would it be possible to perform some simple arithmetic operations (addition, multiplication) on variables with a numerical value and use the result as a new variable?

do you developing you custom plugin?
for example if we have some sql plugin in use, we can write query like:

select hostname, max(network.send* $multiplier)
from
hardware

after that query variables replaced with variable value, for example

select hostname, max(network.send* 1024)
from
hardware

I was hoping I would be able to do something like:

$NewVar = $MyVar1 * $MyVar2

@kempeng I have the exact use case. At the moment I manually calculate and then use the result as constant variable. Were you able to find any solution for this?