gnucash stable: Bug 797384 - Gnucash doesn't handle commodity prices with big...

John Ralls jralls at code.gnucash.org
Mon May 25 14:32:42 EDT 2026


Updated	 via  https://github.com/Gnucash/gnucash/commit/2911a0cc (commit)
	from  https://github.com/Gnucash/gnucash/commit/88e50537 (commit)



commit 2911a0cce3e5816ae1f4f5ef6a7ca3f7cdea3135
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon May 25 11:23:38 2026 -0700

    Bug 797384 - Gnucash doesn't handle commodity prices with big...
    
    numerator/denominator properly
    
    - Use GNC_HOW_DENOM_REDUCE | GNC_HOW_RND_ROUND to preserve precision while
    avoiding overflows.
    
    - Rearrange the function's tests to perform only one division or
    multiplication instead of unconditionally dividing
    
    - Rename the from_ and to_ variables to p(rice)1 and p2 to reduce
    conflation with the input from and to.



Summary of changes:
 libgnucash/engine/gnc-pricedb.cpp | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)



More information about the gnucash-patches mailing list