On 21 December 2020 at 22:14, Peter West said:

> There’s no rounding as such involved in the formulae. The timing will
> only matter if total_amount changes between the two calculations, which I
> assume it will not do. If x/2, when x is an integer (be it number of cents
> or number of pennies or whatever), does not give identical results for the
> same x whenever it is executed, something is seriously wrong.
> 
> If x is a floating point number, odd things can happen. Even so, for the
> same x, the result must be constant. The developers should be able to
> clarify all of this.

Of course there is rounding, but no-one suggested it was visible in the 
formulae.

Half an odd number cannot be represented as a whole number and the end 
result is necessarily rounded either up or down. This is true even if the 
calculation is done in floating point rather than rational arithmetic.

As I said, much depends on whether the rounding occurs at the end (as I 
would expect, and as the OP's report suggests) or at each stage of the 
calculation (which is inconsistent with the OP's report).

_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to