Docs for RoundAccounting() are incorrect (luckily)

The A12 documentation says (emphasis mine)

RoundAccounting and RoundAccountingValue always round in the direction of the next number (when indicated, with decimal places). If both neighbors are equidistant, then the (field) value is rounded down

Luckily, it actually behaves differently:

RoundAccounting(1.5) => 2
RoundDown(1.5) => 1
RoundUp(1.5) => 2

RoundAccounting(-1.5) => -2
RoundDown(-1.5) => -2
RoundUp(-1.5) => -1

So, RoundAccounting actually rounds “away from zero” if the neighbors are equidistant (not “down” as the docs say).

This really is the most common rounding method, so I consider this as a documentation rather than an implementation bug.

Hi @stephen-warm-graph,

Thanks for drawing attention to this. I’ve passed your feedback onto the Kernel Team.

Don’t forget, you can give feedback about the documentation directly using the grafik icon in the top right-hand corner of the Documentation
.

Thanks Malcolm!
I have not forgotten that. I just never knew or noticed until now :wink: