Minor changes and face floating point discrepancy problems

I compared the results from the original Fortran codes and the new C++
codes, and found the computation order matters!