Am 19.08.13 10:46, schrieb jtuc...@objektfabrik.de:
Am 19.08.13 10:38, schrieb Sabine Knöfel:
I think, this is a lot of stuff for one single value. I tend to convert the
FixedDecimal into a Float for storing it. In this case, it would be like
this:

  "vatAmountEUR": 0.7196

When loading, I immediately re-convert it into a FixedDecimal. I would do NO
computing with the float(!!).

What is your opinion about this (rounding issues, performance, database size
etc.)?
Do you think, there is something against it? What would you do?


Hi Sabine,

my misinformed opinion on storing fixed decimals is to completely avoid floats and keep it as simple as possible. Floats smell like problems to me. Why not store two integers: one for the integer part and one for the digits and implement some kind of converter for storing/retrieving.

with "digits" I mean the part after the decimal point. Would decimal part be a better term? not sure...


Joachim





--
-- 
----------------------------------------------------------------------- 

Objektfabrik Joachim Tuchel          mailto:jtuc...@objektfabrik.de 
Fliederweg 
1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1


Reply via email to