[development] Converting floats stored in scientific notation back to decimals
Karen Stevenson
karen at elderweb.com
Tue Nov 6 10:26:18 UTC 2007
There's no telling what kind of info is stored there now, it could be decimals of various kinds and also integers, and some of the larger numbers are stored in scientific notation. My plan was to provide both a float and a real decimal field, but since we previously called the float field 'decimal', there undoubtedly are people out there who have decimal data stored in it that field they will want moved to the new decimal field, so I wanted to provide a migration path. I never intended to blindly convert everything, just provide a way to do it for people who really do want that info in a decimal field.
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'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 simple.
Karen
----- Original Message ----
I'd love to have both float and decimal fields provided by CCK. I.e.
decimal fields could be renamed to float and a new decimal field could
be added.
>
> Since we are talking about updating/converting existing data, a
> question is what people could have possibly stored there. Just money?
> (and what currency?) Scientific measurements? Percentages and ratios?
> (and what precision did they expect?) Hence my reservations about
> storing fixed-point numbers.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20071106/bc4250ce/attachment.htm
More information about the development
mailing list