When I first encountered rounding in retail discount, I wanted to solve it in discount design, i.e. prevent it from happening if possible.
Unfortunately, we cannot. If you have a threshold discount of $10 off with purchase $50 or more and you buy three of the same products, I cannot round it per unit and discount $9.99 to you. In addition, I have often seen deals like buy 3 for $1. Apparently, the merchandizing manager likes the appealing $1, while confident that engineers would figure out the rounding properly.
First, let’s look at one sales line with quantity 3. We have two choices:
1. Keep the whole sales line. Effectively, the unit discount amount is $3.333333. This may result in rounding inconsistency in partial return. For example, you return three times, each of quantity 1, the total discount in return might be $9.99, instead of $10.
2. Split the sales line into two. One sales line has quantity 2 and discount $6.66, while the other one has quantity 1 and discount $3.34. We would not get into the rounding error as in the previous case. Unfortunately some retailers hate sales line splitting.
Secondly, what about three sales lines, each of quantity 1? We do not really have a choice here. We have to have $3.33 off for two sales lines, while $3.34 off for the other one.
Thirdly, what about scale item with non-integer quantity? We cannot split an apple into two. We have to accept not-rounded per unit discount amount.
As in many other cases, retailers have different, sometimes conflicting, preferences towards rounding. One thing for sure though, if you miscalculate by a penny, they will come after you.
In summary, in doling out a discount amount to multiple quantities (and/or multiple products), we need to ensure no rounding error as a whole. Secondly, sometimes it is one sale line of high quantity, while other times, it is multiple sales lines (of the same products).