mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-11-04 05:06:48 -06:00
GncNumeric // truncated towards zero, so GncNumeric(-7, 2) // 1 gave -3 where Python's // floors to -4. int() converted through a float and lost precision above 2**53: int(GncNumeric(2**53 + 1)) returned 9007199254740992. Round // with GNC_HOW_RND_FLOOR and convert int() through the exact fraction. int() now goes through to_fraction(), which read a negative denominator as a divisor; GnuCash treats it as a multiplier, so GncNumeric(3, -100) is 300. to_fraction() now does the same.