On Tue, Mar 17, 2009 at 5:23 PM, James C Field <[email protected]> wrote: >> Isn't this why IBM supported Binary Coded Decimal? Floating Point sux for >> money.
Floating point works fine for money unless you represent values as fractions. In other words, scale things properly and you should be fine. Bad: 1.99 dollars Good: 199 cents That said, if you are representing money values in cents, you can run into problems if you deal with values exceeding 45 trillion dollars. With inflation, this might become a real problem before too long. On the other hand, if inflation gets that bad, losing a few pennies here and there should be a relatively minor worry. It's not as if they would be worth much of anything under those circumstances. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
