Good day, As a matter of interest, when calculating interest on a sum of money expressed in pennies, how do you handle int arithmetic truncating? Is that an accounting design rule thing when dealing with fractions of a penny to round?
Is this an arbitrary quantization? Once upon a time there existed the Ha'penny https://en.wikipedia.org/wiki/Halfpenny_%28British_pre-decimal_coin%29 https://en.wikipedia.org/wiki/Half_cent_%28United_States_coin%29 I think the ugly-bags-of-mostly-water indirection was humorous. I found it funny. https://en.wikipedia.org/wiki/Home_Soil live long and prosper. Adam On Wed, Dec 16, 2015 at 10:17 AM, Bernardo Sulzbach <mafagafogigante at gmail.com> wrote: > On Wed, Dec 16, 2015 at 9:43 AM, Keith Medcalf <kmedcalf at dessus.com> wrote: >> >>> Hello, so in short, rounding the column anywhere it is used, is >>> another solution. I confirmed this below. Thanks, E. Pasma. >>> >>> BEGIN; >>> UPDATE fmtemp SET bal = ROUND(bal,2) + 123.45; >>> (repeat a 1.000.001 times >>> END; >>> SELECT bal FROM fmtemp; >>> 123450123.45 >> >> Absolutely not! You should NEVER round the value and store it back in the >> datastore. Rounding is ephemeral for the convenience of >> ugly-bags-of-mostly-water who are fixed in their world-view so that data can >> be DISPLAYED to them in a format that fits their limited view. >> > > Although I agree about not rounding and updating the store with > "corrected" values. I don't think there is a need to call the > ugly-bags-of-mostly-water ugly-bags-of-mostly-water. Also, I wouldn't > want myself to see 22.9999999999 instead of 23.00 in the frontends I > use either. In a practical sense, I believe the latter reduces the > amount of processing my brain has to do and I can better focus on what > matters. But then again, just use string formatting on the view of the > project. > > On Wed, Dec 16, 2015 at 12:05 PM, E.Pasma <pasma10 at concepts.nl> wrote: > >> Ok this does not work of any scale of numbers. But a solution with integers >> neither does >> >> E.Pasma >> > > Preferences aside, no solution ever devised will work with **any** > scale with numbers as we have finite data storage. That is very > pedantic, but just to be clear. I like integer better than floating > points and text for currencies, some will have other preferences, it > does not really matter as long as we are not working together. > > -- > Bernardo Sulzbach > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users -- -------------- VerifEye Technologies Inc. 151 Whitehall Dr. Unit 2 Markham, ON L3R 9T1