In QGIS 3.4.4, using the Field Calculator, the expression




where I expected it to return


Converting the field to real round(to_real(-2.040),1) did not change anything.

In QGIS 2.18.19 and got the expected result.

Is the syntax changed in 3.x or is this a (known) bug? Or am I expecting the wrong output?

QGIS 3.4.4

QGIS 2.18.19

  • 1
    Interesting. The problem is reproducible, though only valid for negative values. Always the last number is rounded wrongly. Positive values are rounded correctly. – Erik Feb 4 '19 at 11:00

I believe this bug has been reported and fixed for the next update:


| improve this answer | |
  • 1
    Thanks sir, this is an answer I was looking for. – nielsgerrits Feb 4 '19 at 11:10
  • 2
    @nielsgerrits and Joseph The issue of rounding negative values was fixed in the latest stable release of QGIS 3.4.4-3. Now rounding negative numbers produces correct results. Please refer to the duplicate question link. – ahmadhanb Feb 15 '19 at 6:22
  • @Joseph You are welcome :) – ahmadhanb Feb 15 '19 at 10:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.