Algorithm changes

1. moved from float to double
2. normalize the coefficients at every iteration