3 ms·
The correct answer will depend on the specifics of your environment. In some places, tax is calculated per line item. If you go to a dollar store and buy 10 i
by projektfu 3y ago
The correct answer will depend on the specifics of your environment. In some places, tax is calculated per line item. If you go to a dollar store and buy 10 items with 7.3% sales tax, it adds up without those 0.3¢ bits. In other places, the tax is supposed to be calculated on the total for the tax category in the sale. If you wanted to keep it by line item you'd need the extra digits of precision.
- TheCoelacanth 3y agoWell, yes, which is why you need to be in control of your rounding and not just let the width of data type you chose for the implementation dictate that.