The caret () can be a little confusing. While this would be "to the power of" in math, it's Xor on a computer. "$a xor $b" means, quoting the manual, "bits that are set in $a or $b but not both are set." So this means any bit that is set in only one but not the other. Not quite "to the power of," but you could use other bitwise operators (<< and >>--or bitshift left and bitshift right, respectively) to do some 2, which computers obviously do extremely fast.
That being said, you'll want to have a look at [man]pow/man which was previously mentioned. This works exactly like ^ in math, but does not take decimals in the powers. Therein lies your error. So, we'll move on to the next function.
[man]exp/man "calculates the exponent of e (the Neperian or Natural logarithm base)." How does this help you? Well, initially, it won't. However, with the combination of [man]log/man, it comes quite handy. We can use these two in combination, like so:
$samba = exp(3.115 * log($var8));
By the way, it's a good idea to look up all the functions and read their user notes. I learned this from one of the user notes, so here's a an in-depth explanation.