You should only be calling pow() once.  This is much more expensive than multiplication.