Replies: 1 comment
-
I've designed the application while taking great care to avoid floating point math altogether, since with metric units, where everything is a multiple of each other, I can. It seems a fluid ounce doesn't really translate well to a milliliter, since 1 fl.oz. = ~29.57 ml, and changing the base unit to one that's that large without using decimals will introduce a margin of error when it comes to kcal calculation. I do lack real world data for this though, since I don't live in the US. Do products ever come in fractions of fl.oz., or is that rare? Do you get 10, 20, 30 fl.oz. of something, or are they 19.5, 40.3, etc? If fractional quantities are rare and close enough to be interchangeable, I can probably just introduce a toggle to make the UI say "fl.oz." and do the conversions internally whilst still storing the data as metric internally. Another point of note is nutritional information on labels. US products I've seen don't have a standardized unit of measure, just a vague "nutrition per serving". Using the "Ingredients" functionality in Calorific can be tricky to figure out in regards to this, since it's wholly based on the fact that in every metric country, nutritional information is given as values per 100 g/ml, and this is what is used when creating meals and log entries within Calorific. Is there any standardization on labels in the US that give the same frame of reference for all products, like this? I assume just changing "kcal per 100g/ml" to "kcal per 100g/fl.oz." wouldn't make sense in the context of what you can just read off the label? Edit: From Wikipedia:
But, also from Wikipedia (emphasis mine):
...which introduces the problem that, even though fl.oz. as a serving size is exactly 30 mL, the package size uses a fl.oz. which is 29.57 mL, again introducing inaccuracies and errors. Meaning that if you measure 10 fl.oz. of a product with your measuring cup, and read of the label that you'll get 300 kcal from that, you're actually getting ~295 kcal, a ~1.5% difference. Small, but still there. But again, I lack real world data - is this just commonly accepted and people just consider the packing and serving sizes the same, even despite the unit discrepancy? Admittedly, a ~1.5% margin of error works out to about 30 kcal for a 2000 kcal-a-day diet, so in most cases it is negligible. |
Beta Was this translation helpful? Give feedback.
-
Is there anyway to change the measurments used? Being american, our dumbasses dont use mL very often lol, so I was wondering if it would be easy to change ml to floz . Love the app though!
Beta Was this translation helpful? Give feedback.
All reactions