Correct computation method of phi_hat, the solution of A_hat*phi_hat =
B.