Frank Millman Friday, December 11, 2015 9:21 AM > > I am having a problem accumulating decimal values. >
> sqlite> UPDATE fmtemp SET balance = balance + 123.45; SELECT bal FROM > sqlite> fmtemp; > 6049.04999999999 > > Can anyone explain what is going on, and is there a way to avoid it? > It's because of the way that floating point math and display happens. Simply put, there's no way to avoid it if you really want to use floating point numbers. Bernardo's suggestion about using integer math may be a fairly easy workaround, especially if you're just adding numbers. ---------------------------------------------------------------------- This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.bankofamerica.com/emaildisclaimer. If you are not the intended recipient, please delete this message.