Compute x * 2^ex.
This function computes the value of x * 2^ex, where x is the ith element of the input matrix A, and ex is the desired value of the exponent.