Interesting Calculator Error

Eric Siegmann's Avatar

Eric Siegmann

15 Jul, 2026 10:06 PM

Hello,

Really like Moneydance. Interestingly I found that when doing a simple addition and subtraction calculation using the built-in calculator, I got this unusual rounding error. Wanted to bring it to your attention in case it affects other calculations.

  1. 1 Posted by sth on 18 Jul, 2026 08:27 PM

    sth's Avatar

    This is just the fact that computers are binary. And thus can not express decimals exactly. At some point they have to round to a finite number of bits of precision. In this case it is a 64 bit double precision number or equivalent to about 17 decimal places.

    Fortunately for all of us, financial calculations round to the nearest 0.01 (usually) and sometimes for share allocation 0.0001. This is way below any binary forced rounding errors and so it is insignificant.

  2. Support Staff 2 Posted by Ethan on 21 Jul, 2026 01:00 AM

    Ethan's Avatar

    Hello,

    Thanks for letting us know. I think the above explanation is correct. I've filed a bug ticket.

    Please let me know if I can be of further assistance,

    Ethan
    Infinite Kind Support

  3. 3 Posted by Stuart Beesley ... on 27 Jul, 2026 05:57 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    This has been fixed in MD2026(5504) alpha.

  4. 4 Posted by sth on 14 Aug, 2026 03:07 PM

    sth's Avatar

    Not a bug. And the fix is just to display less digits and round to less than the accuracy of a floating point double. So not a fix to not a bug, but just hide the effects of representing a base 10 decimal in binary from confused users.

    (Complaint about terminology, not the change) -sth (Grumpy programmer from the 60s who dealt with this for many years)

  5. 5 Posted by Stuart Beesley ... on 14 Aug, 2026 05:33 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Not quite, and it's not rounding as such... But it doesn't matter. The 'fixed' code matches the same code used everywhere else in Moneydance where it makes no sense to display non-sensical floating point precision when in fact people expect to see £10.50 (instead of 10.5000000000001) or price £1.2453 (instead of 1.2453000000098). There is no fixed rounding being applied...

    As stated, the calculator has been addressed to show numbers that make more sense to people...

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • Screenshot_2026-07-11_at_9.33.12 AM.png 243 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac