I have two bytes arriving from my node and I am trying to perform the calculation 2^^bytes[0] * bytes[1] with JS in the Application Configuration. ie bytes[1] is the mantissa and bytes[0] is the exponential term.

I have tried two different methods and both result in an error
(2 ** bytes[0]) * bytes[1]
Math.pow(2,bytes[0]) * bytes[1]

Is it possible to calculate Exponentials in the Application Configuration? If so, could someone point me to the correct syntax.

Solved
The equation I am calculating is “var result = 2^^bytes[0] * bytes[1]”
In this case the power to base 2 is the same as left shifting by the number contained in bytes[0], so the equation could be rewritten something like “var result = (1<< bytes[0]) * bytes[1]”

However there is one further simplification which can be applied (and it works)