{
  "capability_id": "electrical.mah_to_wh",
  "tool_id": "mah-to-wh",
  "engine": "mah-to-wh",
  "calculation_version": "1.3.1",
  "generated_at": "2026-09-16T22:03:43.711Z",
  "engine_build": "2026-09-10",
  "test_count": 13,
  "passed": 13,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 8,
      "passed": 8
    },
    "boundary": {
      "total": 2,
      "passed": 2
    },
    "property": {
      "total": 3,
      "passed": 3
    }
  },
  "engine_tested": true,
  "expert_reviewed": true,
  "internally_reviewed": false,
  "review_kind": "expert",
  "source_checked": true,
  "reviewed_by": "CalculatorX electrical review",
  "reviewer_role": "electrical-engineer",
  "last_reviewed": "2026-08-08",
  "expert_review": {
    "status": "approved",
    "reviewer": {
      "name": "CalculatorX electrical review",
      "role": "electrical-engineer"
    },
    "reviewed_at": "2026-08-08",
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "kind": "expert"
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/electric/mah-to-wh",
  "api": "https://www.calculatorx.com/api/v1/calc/mah-to-wh",
  "schema_input": "https://www.calculatorx.com/schemas/electrical.mah_to_wh.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/electrical.mah_to_wh.output.json",
  "assumptions": [
    "Voltage is the nominal basis for the mAh rating",
    "Conversion ignores charge/discharge efficiency and Peukert effects"
  ],
  "limitations": [
    "Ignores charge/discharge efficiency and Peukert effects",
    "V ≤ 0 → VOLTAGE_MUST_BE_POSITIVE"
  ],
  "boundary_conditions": [
    "Zero voltage on mAh→Wh (scale-product) yields 0 Wh — soft boundary",
    "Zero voltage on Wh→mAh (scale-quotient) yields 0 mAh — soft boundary",
    "Zero mAh yields 0 Wh",
    "Ignores charge/discharge efficiency and Peukert effects"
  ],
  "sources": [
    {
      "title": "IEC 60050 — International Electrotechnical Vocabulary",
      "section": "Electric charge (IEV 113-02-10)",
      "url": "https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=113-02-10",
      "supports": "Electric charge Q; coherent SI unit coulomb. Note: 1 A·h = 3.6 kC is used for electrolytic devices / batteries",
      "kind": "standard",
      "accessed": "2026-09-05",
      "clause": "IEV 113-02-10"
    },
    {
      "title": "IEC 60050 — International Electrotechnical Vocabulary",
      "section": "Watt hour (IEV 131-11-58)",
      "url": "https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=131-11-58",
      "supports": "1 Wh ≔ 3600 J. At constant terminal voltage, E(Wh) = Q(Ah)×V from W = ∫v i dt",
      "kind": "standard",
      "accessed": "2026-09-05",
      "clause": "IEV 131-11-58"
    },
    {
      "title": "BIPM SI Brochure (9th edition, version 4.01)",
      "section": "Coulomb, watt-hour, and volt",
      "url": "https://www.bipm.org/en/publications/si-brochure",
      "supports": "Unit scaling mAh → Ah (10⁻³); Wh = A·h × V at constant V",
      "kind": "reference",
      "accessed": "2026-09-05",
      "published": "2026-06",
      "doi": "https://doi.org/10.59161/AUEZ1291"
    },
    {
      "title": "NIST Guide to the SI (SP 811)",
      "section": "Joule, watt-hour, and ampere-hour relationships",
      "url": "https://www.nist.gov/pml/special-publication-811",
      "supports": "Wh = mAh × V / 1000; Q = Wh × 1000 / V",
      "kind": "reference"
    },
    {
      "title": "Battery industry convention",
      "section": "Nominal voltage basis for mAh ratings",
      "supports": "Conversion uses stated nominal V; ignores efficiency and Peukert effects",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:b96f77aebd58571f9cc7967ca63c5bec8c78cc4cd6de1944cb2cd8546350f6b5",
  "tests": [
    {
      "id": "10000-3.7",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "mah-wh",
        "a": 10000,
        "b": 3.7
      },
      "expect": 37,
      "expectWarning": null,
      "actual": 37,
      "tol": 0.001
    },
    {
      "id": "300-5",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "mah-wh",
        "a": 300,
        "b": 5
      },
      "expect": 1.5,
      "expectWarning": null,
      "actual": 1.5,
      "tol": 0.001
    },
    {
      "id": "8000-1.5",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "mah-wh",
        "a": 8000,
        "b": 1.5
      },
      "expect": 12,
      "expectWarning": null,
      "actual": 12,
      "tol": 0.001
    },
    {
      "id": "wh-to-mah",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "wh-mah",
        "a": 1.5,
        "b": 5
      },
      "expect": 300,
      "expectWarning": null,
      "actual": 300,
      "tol": 0.1,
      "engine": "mah-to-wh"
    },
    {
      "id": "5000-3.7",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "mah-wh",
        "a": 5000,
        "b": 3.7
      },
      "expect": 18.5,
      "expectWarning": null,
      "actual": 18.5,
      "tol": 0.001
    },
    {
      "id": "linear-2x-V",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "mah-wh",
        "a": 5000,
        "b": 7.4
      },
      "expect": 37,
      "expectWarning": null,
      "actual": 37,
      "tol": 0.001
    },
    {
      "id": "zero-V",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "mah-wh",
        "a": 5000,
        "b": 0
      },
      "expectError": "VOLTAGE_MUST_BE_POSITIVE",
      "code": "VOLTAGE_MUST_BE_POSITIVE",
      "error": "voltage must be greater than zero"
    },
    {
      "id": "soft-zero-mah",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "mah-wh",
        "a": 0,
        "b": 3.7
      },
      "expect": 0,
      "expectWarning": null,
      "actual": 0,
      "tol": 1e-12
    },
    {
      "id": "zero-V-reverse",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "wh-mah",
        "a": 1.5,
        "b": 0
      },
      "expectError": "VOLTAGE_MUST_BE_POSITIVE",
      "code": "VOLTAGE_MUST_BE_POSITIVE",
      "error": "voltage must be greater than zero",
      "engine": "mah-to-wh"
    },
    {
      "id": "roundtrip-wh-mah",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "wh-mah",
        "a": 18.5,
        "b": 3.7
      },
      "expect": 5000,
      "expectWarning": null,
      "actual": 5000,
      "tol": 0.1,
      "engine": "mah-to-wh"
    },
    {
      "id": "property-mah-wh",
      "ok": true,
      "kind": "property",
      "detail": "5000·3.7/1000",
      "expect": 18.5,
      "actual": 18.5
    },
    {
      "id": "property-roundtrip",
      "ok": true,
      "kind": "property",
      "detail": "Wh→mAh",
      "expect": 5000,
      "actual": 5000
    },
    {
      "id": "property-linear",
      "ok": true,
      "kind": "property",
      "detail": "2× mAh",
      "expect": 37,
      "actual": 37
    }
  ],
  "tier": "expert_verified",
  "verification": {
    "tests": {
      "passed": 13,
      "total": 13,
      "golden": 8,
      "boundary": 2,
      "property": 3
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-07T02:30:56.872Z",
  "rendered_at": "2026-09-16T22:03:43.711Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.3.1",
    "artifacts": {
      "engine": "1.3.1",
      "page": "1.3.1",
      "capability": "1.3.1",
      "evidence": "1.3.1",
      "input_schema": "1.3.1",
      "output_schema": "1.3.1",
      "mcp_contract": "1.3.1"
    },
    "digests": {
      "input_schema_sha256": "e84d3e6f3dcd836b717ffad12fadd65f6ca418d209a761c0b816b4e10e2c3dcb",
      "output_schema_sha256": "4fb56170345c6b278e5fa8d5d607babc3477f3d6beb2ac6f4d423314342b1d9e",
      "evidence_sha256": "18a08f716363f5d5df4415a7936e3cccb305e7a099a83de70b6f891dda706437",
      "evidence_core_sha256": "18a08f716363f5d5df4415a7936e3cccb305e7a099a83de70b6f891dda706437",
      "capability_sha256": "be46590198c35a30f46138a9cf7d288cbe481ba0a125df7763181638c2269fb2",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.3.1"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
