
Ask HN: Financial data and rounding - nopal
I made a proposal to a client on how they should store and work with finaicnal data that has the potential to involve minute fractions of a dollar. (e.g. Pay contractor B 13.31% of the $55.53 billed)<p>I proposed that they keep financial values in as accurate a form as possible (to the ten-thousandths, because they use the T-SQL smallmoney type), use bankers' rounding and round at the last possible moment.<p>This proposal was rejected and I was told that they wanted to round to the hundredth, use "round half up" rounding and perform the rounding before any calculations were performed with the financial data.<p>I feel that their decisions are wrong, but they are adamant and this edict came from their financial department.<p>Am I worrying too much, or does it seem like this is a large potential problem?
======
ScottWhigham
Personally if all of my forecasting, AP and AR are in a hundredths-based
system, I'd keep the data stored that way. There will never be a time in which
they will cut a check or do forecasting in anything less than hundredths so
why worry about storing to the ten-thousandths?

I'm a T-SQL guy myself and many folks do not use SMALLMONEY or MONEY datatypes
because they allow thousandths/ten-thousandths. Instead we use DECIMAL so that
we can force storage of only hundredths.

