3 ms·
Base-2 is a problem in accounting because the written value doesn't always actually numerically equal what's being represented internally. With decimal, you don
by reikonomusha 12y ago
Base-2 is a problem in accounting because the written value doesn't always actually numerically equal what's being represented internally. With decimal, you don't have that problem, because we write in decimal.
The bigger problem however is how precision is "managed" with floats, which leads to things like non-associativity of operations.
- inglor 12y agoYes, but the way we write decimals doesn't represent numbers very easily, for example 10/3 can't be represented accurately with finite length decimals (but can with rationals)
- ricardobeat 12y agoThus you'll never see anything being sold for "a third of a dollar". Accounting and finance have specific rules for rounding these, which can then be replicated with precision.
- upofadown 12y agoThe article suggested hardware BCD (packed decimals) was superior to floating point. That is true but not for the reason stated. The reason old time BCD was better was simply because they were treated at counting numbers (integers). If you use binary integers you get all of the same advantages with none of the serious headaches of BCD.