Guth
NewsDocs
Page actions
View as Markdown ↗
Explore MCP tools ↗

instrument implementation / implementation-contract

Caloric Content / Macronutrient Calculator implementation

A source-bound implementation contract for Caloric Content / Macronutrient Calculator; deployment and executable qualification remain separate.

Status: VERIFIED_CLEANLifecycle: implementation-contract

Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

Record owner
Guth Instruments
Lifecycle
verified-clean
Evidence ID
t5-035
Effect
Computation or source lookup only

Input and validation requirements

The all-zero input produces a valid total of 0 kcal but makes every percentage calculation 0/0 and therefore undefined. An implementation without an explicit zero-denominator guard will return invalid numeric results such as NaN or Infinity.

Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

{
  "inputs": {
    "protein_g": 20,
    "carb_g": 30,
    "fat_g": 10,
    "alcohol_g": 0
  },
  "expected_outputs": {
    "total_kcal": 290,
    "protein_percent": 27.59,
    "carb_percent": 41.38,
    "fat_percent": 31.03,
    "alcohol_percent": 0
  },
  "working": "Protein kcal = 4 × 20 = 80. Carb kcal = 4 × 30 = 120. Fat kcal = 9 × 10 = 90. Alcohol kcal = 7 × 0 = 0. Total = 80 + 120 + 90 + 0 = 290 kcal. Protein percentage = 80 ÷ 290 × 100 = 27.59%. Carb percentage = 120 ÷ 290 × 100 = 41.38%. Fat percentage = 90 ÷ 290 × 100 = 31.03%. Alcohol percentage = 0 ÷ 290 × 100 = 0.00%."
}

Other records

Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

  • VERIFIED_LEDGER.json
  • evidence-tranche5/tranche5-results.json