I'm porting your code to Delphi (yes) and as I was using the OpenFoodFact Nutriscore Test suite I discovered that Saturated-Fat value has to be rounded to closest integer.
Thank you for your input, very relevant!
I'm curious if we can find the rounding requirement in the source documents, then I'd be happy to correct that.
I'm porting your code to Delphi (yes) and as I was using the OpenFoodFact Nutriscore Test suite I discovered that Saturated-Fat value has to be rounded to closest integer.
See this OpenSourceFacts test suite comment : https://github.com/openfoodfacts/openfoodfacts-server/blob/main/tests/unit/nutriscore.t#L59
https://github.com/q-m/nutriscore-ruby/blob/dbffe04acd1c0f45fcf4db76f22dbfed2a6534c1/lib/nutriscore/fr/negative_score.rb#L29