Skip to content

Main content

Food Basket Energy One Commodity Share Tool

Calculate food basket energy one commodity share from explicit caller-supplied inputs.

Loading tool…

Description

Return commodity energy and its share of the total.

Food quantities depend on whether their basis is gross, edible, drained, wet, dry or solid mass. Changing the denominator can change a reported concentration or yield without changing the actual sample or proving anything about its safety.

Return commodity energy and its share of the total.

When to use this tool

Use Food Basket Energy One Commodity Share when you need a stated food-mass, composition-basis or yield calculation.

How to use the tool and how it works

  1. Enter commodityMass, energyPerMass, otherEnergy. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read commodityEnergy, energyShare. Use the output convention below.

Require nonnegative commodity mass, energy/mass and other energy with positive total energy. Return commodity energy and its share of the total.1

Input fieldMeaning and unitsAccepted input
commodityMassCommodity MassRequired. Finite number; minimum 0.
energyPerMassEnergy Per MassRequired. Finite number; minimum 0.
otherEnergyOther EnergyRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
commodityEnergyCommodity EnergyRequired. Finite number.
energyShareEnergy Share Unit: 1.Required. Finite number.
json
{
  "input": {
    "commodityMass": 2,
    "energyPerMass": 1000,
    "otherEnergy": 3000
  },
  "output": {
    "commodityEnergy": 2000,
    "energyShare": 0.4
  }
}

Limitations and assumptions

  • Energy units and mass basis must match. One energy share does not establish dietary balance, nutritional adequacy or individual intake requirements.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Reconcile measured quantities and preparation records on a common basis. Use the appropriate laboratory, nutritional or safety assessment when arithmetic alone cannot establish the intended property.

References

  1. Calculation and input contract: food-security/food-basket-energy-one-commodity-share — tool.io

Similar or alternative tools