"Vladimir G. Ivanovic" skribis: > http://en.wikipedia.org/wiki/Floating_point#Accuracy.2C_and_misconceptions_thereof > "...financial software tends not to use a binary floating-point number > representation. The "decimal" data type of the C# and Java programming > languages, and the IEEE 854 standard, are designed to avoid the problems > of binary floating point, and make the arithmetic always behave as > expected when numbers are printed in decimal." What you really want for financial applications is fixed point decimal, because you can’t throw away any digits except when dividing. For hand calculators you want binary floating point with guard digits. Enough research has gone into writing code for IEEE floating point that I would not try to bypass it without a good reason. It’s there to be your friend. -- Barry.SCHWARTZ at chemoelectric.org http://chemoelectric.org Free stuff / Senpagaj varoj: http://crudfactory.com (PDF) 'Democracies don't war; democracies are peaceful countries.' - Bush (http://www.whitehouse.gov/news/releases/2005/12/20051219-2.html)