Re: IEEE-754 DP-FP rounding question
- From: "robertwessel2@xxxxxxxxx" <robertwessel2@xxxxxxxxx>
- Date: 15 Feb 2007 22:08:36 -0800
On Feb 15, 11:45 pm, glen herrmannsfeldt <g...@xxxxxxxxxxxxxxxx>
wrote:
Taxes are funny that way. I do remember the Maryland sales tax
from some years ago, which tended to round up much more often than
you might expect.
I remember some years ago after a winery tour, in line to buy some
wine. I had figure out from watching those in front of me that it
cost one cent less to buy two bottles separately, than to buy them
together. I presume, then, that sometimes your rounding will give
different tax amounts to two items that have the same price.
Correct. Consider an invoice with three lines items, each for 33
cents. Then assume 10% tax. So the tax on the invoice is going to be
10 cents. If you try to expand that on each line item you either get
three cents on each line item (and you're obviously missing a penny
someplace), or two of the 33 cent line items get three cents of tax
and the other 33 cent line item gets four cents.
The obvious answer is "don't do that," but it's certainly not
unreasonable that a customer would want to know how much tax he paid
on the widgets in line item #3.
.
- Follow-Ups:
- Re: IEEE-754 DP-FP rounding question
- From: glen herrmannsfeldt
- Re: IEEE-754 DP-FP rounding question
- References:
- IEEE-754 DP-FP rounding question
- From: VK
- Re: IEEE-754 DP-FP rounding question
- From: robertwessel2@xxxxxxxxx
- Re: IEEE-754 DP-FP rounding question
- From: Terje Mathisen
- Re: IEEE-754 DP-FP rounding question
- From: Nick Maclaren
- Re: IEEE-754 DP-FP rounding question
- From: VK
- Re: IEEE-754 DP-FP rounding question
- From: Nick Maclaren
- Re: IEEE-754 DP-FP rounding question
- From: VK
- Re: IEEE-754 DP-FP rounding question
- From: robertwessel2@xxxxxxxxx
- Re: IEEE-754 DP-FP rounding question
- From: glen herrmannsfeldt
- IEEE-754 DP-FP rounding question
- Prev by Date: Re: IEEE-754 DP-FP rounding question
- Next by Date: Re: IEEE-754 DP-FP rounding question
- Previous by thread: Re: IEEE-754 DP-FP rounding question
- Next by thread: Re: IEEE-754 DP-FP rounding question
- Index(es):