work around floating point errors

Merged Theo Steininger requested to merge smoothing_fixes into master

Merge request reports