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
|
score_value(@nutrients.fat_saturated, 0..10) do |v| |