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

Reply via email to