fix error and improve performance
Merge pull request #760 from yemel/fix/test-changes

improve performance at rounding error tests