in reply to Re: Strange int() result
in thread Strange int() result

The only shop I ever worked in where I had to touch the money code did this too. We used cents as the integer instead of millicents but same idea, just grainier precision.

Also noticed MJD's note–

Your account is currently past due! Pay the outstanding balance of $ 0 . 00 or we will be forced to refer your account for collection.

I got this exact letter from American Express once so plenty of devs who have no business making this class of mistake do so anyway.

Replies are listed 'Best First'.
Re^3: Strange int() result
by davido (Cardinal) on Jun 18, 2014 at 20:11 UTC

    I've had bills for amounts in the "few pennies" range; less than the value of the postage stamp. Back in the days when I paid via checks and snail mail, I recall on at least one (possibly more) occasion I intentionally sent a check rounded up to a dollar.

    This accomplished two things. First, it threw any possible round-off-error ball back into their court. And second, it gained me the minor satisfaction of getting the last word -- forcing a refund check in a silly-small amount.


    Dave

Re^3: Strange int() result
by RonW (Parson) on Jun 18, 2014 at 21:29 UTC

    I twice got a similar letter, except the balance was $(0.01), meaning they owed me money. Turns out there was a bug in the Point of Sale software where the sales tax was rounded down for purchases and up for returns. I pointed it out after the first letter. The rest of that billing cycle I had no purchases, thus the second letter.