{
  "schemaVersion": 1,
  "slug": "jeans-size-converter",
  "category": "fashion",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "a0f68f6c65473c28168d8e1630d3f092709bfecf348a733ece4357f36cd63533",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/jeans-size-converter.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "US_W = input; waist_cm = US_W × 2.54",
    "vars": [
      [
        "US_W",
        "Entered US waist label"
      ],
      [
        "waist_cm",
        "Waist measurement (cm)"
      ]
    ],
    "note": "Input must be a whole-number US W waist label from 20 to 60. The output shows the same waist reference in inches and centimetres, not UK/EU garment sizing."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "if(!Number.isInteger(usSize)||usSize<20||usSize>60)return{us:null,waistIn:null,waistCm:null,__error:'inputError'}; const us=usSize; return {us:'W'+us,waistIn:us,waistCm:us*2.54};",
    "inputs": [
      {
        "name": "usSize",
        "type": "number",
        "default": 32,
        "min": 20,
        "max": 60,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "us",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "waistIn",
        "precision": 0,
        "unit": "in"
      },
      {
        "name": "waistCm",
        "precision": 1,
        "unit": "cm"
      }
    ],
    "interpret": null
  }
}
