On Wednesday, 04 June, 2014 04:43 PM, Mattias Gaertner wrote: > On Wed, 04 Jun 2014 15:47:24 +0800 > "Allan E. Registos" <allan.regis...@smpc.steniel.com.ph> wrote: > >> On Wednesday, 04 June, 2014 06:03 AM, Philippe wrote: >>> generally, if one needs accurate values he does not use real values >>> ... use integer (or word, longint, longword etc) ... then when needed >>> make the conversion or formating (for computing or printing) ... >>> >> My thinking is quite the opposite. I am not a mathematician though. :) >> What if we need a high degree of precision in our computation? So we >> need this type of figure: #####.##### the more precision(accuracy) we >> need, the more digits > If you need 5 digits, i.e. decimals: multiply by 100.000 when > storing and divide by 100.000 when loading the value. > Computers work on binary numbers and decimal 1.2 (= 1+2/10) has no exact > representation in binary. Okay. So, my confusion starts with what the data type the DB recommends when precision is needed and the data type built with Lazarus/fpc. If accuracy and decimals are needed, one must use in Lazarus Integer, and deal with the digits with another integer and merge it as one data type and becomes numeric for storing at the DB side?
Or anyway, as Joost mentioned in his post, one must deal with a TBCDField to read the input values if Zeos provided this correctly. > > > Mattias > > -- > _______________________________________________ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
smime.p7s
Description: S/MIME Cryptographic Signature
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus