{
  "schemaVersion": 1,
  "slug": "shoe-size-converter",
  "category": "fashion",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "262323609695ca0af5460b81a58388c3e4f4b150b4b4eb459b0c42a49f083ad0",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/shoe-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_M = 3c÷2.54 − 22; US_W = 3c÷2.54 − 21; UK = 3c÷2.54 − 23; EU = 1.5c + 2; JP = c",
    "vars": [
      [
        "c",
        "Foot length (cm)"
      ],
      [
        "US_M",
        "US men estimate"
      ],
      [
        "US_W",
        "US women estimate"
      ],
      [
        "UK/EU/JP",
        "Approximate size references"
      ]
    ],
    "note": "c is foot length in centimetres. Results are simplified estimates, not a universal conversion chart; check the shoe maker’s chart."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const cm = unit === 'cm' ? footLength : footLength*2.54; const inch = cm/2.54; return { usMen: 3*inch - 22, usWomen: 3*inch - 21, uk: 3*inch - 23, eu: 1.5*cm + 2, jp: cm, footInches: inch };",
    "inputs": [
      {
        "name": "unit",
        "type": "select",
        "default": "cm",
        "options": [
          {
            "value": "cm"
          },
          {
            "value": "in"
          }
        ]
      },
      {
        "name": "footLength",
        "type": "number",
        "default": 25,
        "min": 10,
        "max": 40,
        "step": 0.1,
        "unitField": "unit",
        "minByUnit": {
          "cm": 10,
          "in": 3.937
        },
        "maxByUnit": {
          "cm": 40,
          "in": 15.748
        },
        "unitScales": {
          "cm": 1,
          "in": 2.54
        }
      }
    ],
    "outputs": [
      {
        "name": "usMen",
        "precision": 1,
        "unit": ""
      },
      {
        "name": "usWomen",
        "precision": 1,
        "unit": ""
      },
      {
        "name": "uk",
        "precision": 1,
        "unit": ""
      },
      {
        "name": "eu",
        "precision": 1,
        "unit": ""
      },
      {
        "name": "jp",
        "precision": 1,
        "unit": ""
      },
      {
        "name": "footInches",
        "precision": 2,
        "unit": "in"
      }
    ],
    "interpret": null
  }
}
