qgis/QGIS — pull request #1299 by manisandro (2014-04-08 10:16:32+00:00)
Title: Use improved rounding function (taken from LibreOffice) in QgsExpression

The round function used in QgsExpression suffers from floating point precision issues when rounding. I.e. when rounding 0.005, 0.015, 0.025 to two decimals, it inconsistently rounds up and down (`0.005 -> 0.01`, `0.015 -> 0.01`, `0.025 -> 0.03`).

This patch adds replaces the rounding function with an adapted version of the LibreOffice rounding function, which does not exhibit this behavior.

Funded by Sourcepole QGIS Enterprise.