gnucash maint: Multiple changes pushed

John Ralls jralls at
Tue Nov 27 08:17:32 EST 2018

Updated	 via (commit)
	 via (commit)
	from (commit)

commit 61cd7999f34a3976fd45bf4668d7012ab3ca4835
Author: John Ralls <jralls at>
Date:   Tue Nov 27 22:11:36 2018 +0900

    Fix half-up, half-down, and banker's rounding for negative numbers.
    We need to compare the magnitudes of the remainder and the denominator
    in order to round negative numbers correctly. Note that while gnc_numeric
    is constrained to a positive denominator the C++ rounding functions cannot
    assume that constraint in all cases.
    Combined with the previous commit, this fixes
    Bug 796949 - Incorrect conversion of 0,01 USD to EUR

commit 536606a89c5b53ad8ef91a63a021b8e564deb3aa
Author: John Ralls <jralls at>
Date:   Tue Nov 27 21:25:29 2018 +0900

    Fix extract_common_prices logic.
    So that the returned price tuple has the two commodities of interest
    converted to a common currency. Before the first pair that that shared
    any random currency would be returned, perhaps creating an absurd result.

Summary of changes:
 libgnucash/engine/gnc-pricedb.c             | 11 +++++---
 libgnucash/engine/gnc-rational-rounding.hpp | 41 ++++++++++++++++++++++++++---
 2 files changed, 45 insertions(+), 7 deletions(-)

More information about the gnucash-patches mailing list