openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
GNU Affero General Public License v3.0
633 stars 371 forks source link

Rounding question on the average Nutri-Score of white rice (B vs. A) #1860

Open aleene opened 5 years ago

aleene commented 5 years ago

What

Part of

hangy commented 5 years ago

That seems to be correct, according to the specs: https://github.com/openfoodfacts/openfoodfacts-server/blob/25d4175330f9fadbba8bc80ec0afea358a9b4c3d/lib/ProductOpener/Food.pm#L4397-L4421

stephanegigandet commented 5 years ago

It could be interpreted either way. -0.71 is above -1 (and thus not A) and less than 0 (and thus not B). As it is an average score, I guess we could round the score to the nearest integer. Or keep the current behaviour.

teolemon commented 4 years ago

Is it fixed by the recode ? @stephanegigandet