On Tuesday 20 January 2009 17:17:02 Martin Vlietstra wrote: > Writing as an IT professional, any electronic data that is stored needs to > be clearly documented. The documentation would make clear the format and > the units that are used for data storage. The application would determine > the accuracy needed. For example, storing weights to the nearest kilogram > for life insurance purposes would be sufficient, but when storing details > for medical purposes, greater accuracy would be needed. I believe that in > the UK, birthweights are rounded to the nearest 10g. > > >From a storage point of view, I would be happy to store weights in grams > > as > > 4 byte integers (from a professional point of view I dislike using floating > numbers unless I absolutely have to). Of course, one need not enter the > data to the nearest gram - that would be determined by the application. > Ideally, the application would also ask for the person's height and age. > For adults, it would question any BMI greater than say 50 or less than say > 10. Appropriate BMI values would be chosen for children, depending on > their age. For example, a newborn infant, 50 cm long and weighing 3.5 kg > has a BMI of 14.
Why do you dislike using floating point? I prefer storing all numbers of the same physical quantity in the same unit, which should be the coherent SI unit if there is one. What are the greatest and least possible BMI of a human? If the range is less than a ratio of a thousand, and the height and mass are always entered together, then the BMI can be used as a sanity check in case someone leaves off the unit when someone's mass is near 20 kg. But since the range of mass is more than three orders of magnitude, the mass alone cannot be used as this sanity check. Pierre
