Step 2 works and compiles and generates almost the correct data. I think rounding errors are to blame, must investigate Eigen's precision.