fix valOut
Merge pull request #81 from matiu/bug/rounding-errors2

fix valOut