[development] Converting floats stored in scientific notation back to decimals
earnie at users.sourceforge.net
Tue Nov 6 13:08:09 UTC 2007
Quoting Karen Stevenson <karen at elderweb.com>:
> It sounds like this is going to get too complicated to do right now,
> and no one is stepping up to do it, so I will probably just add a new
> field type and rename the old one but do nothing about conversion.
I agree that providing another type with the old format is a good thing.
> I'm not sure about the idea of storing decimal data as integers
> instead. That makes it more complicated since the data will need more
> manipulation during input and display, while just adding a regular
> decimal field as another option in the number module would be very
This is the only way to get real precision due to rounding issues
especially for the financial institutions who need to track to
fractions of the lowest money denomination. I have a friend that spent
three days trying to find a penny that came down to a rounding error
because his data was fractional. To implement it you just need to know
what is the most significant fraction (MSF) and then multiply the input
by MSF and for the display divide by the MSF as you've stated.
Earnie -- http://for-my-kids.com/
More information about the development