Need help in using power function in Bash

Hi,

I would like to use a power function in Bash in an awk '{ } .
e.g pow(2,3)=8

Any suggestion? I try to find online resources but most of them stated by using BC.

Please advise. Thanks.

> awk 'BEGIN{print 2^3}' 
8

Hi,

Can i use
awk'{
return 24^a01 +24^a10 +8^a01 +8^a11;

}

??

It seems not working if i used them in associative array.

yup=5*(g-$2)+4*$2+4*$3;

  if(test !=0)
    count[$1]=24^(g-$2) +24^$2 +8^(h-$3) +8^$3;
 else
    count[$1]=2^yup;

where g and h are declared as variables (awk -v g="$g" -v h="$h" )

Please advise.Thanks.