{
  "capability_id": "electrical.diode.equation",
  "tool_id": "diode-equation",
  "engine": "diode-equation",
  "calculation_version": "1.1.0",
  "generated_at": "2026-09-16T22:03:43.729Z",
  "engine_build": "2026-09-12",
  "test_count": 15,
  "passed": 15,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 5,
      "passed": 5
    },
    "boundary": {
      "total": 6,
      "passed": 6
    },
    "property": {
      "total": 4,
      "passed": 4
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": true,
  "review_kind": "internal",
  "source_checked": true,
  "reviewed_by": "CalculatorX electrical review",
  "reviewer_role": "electrical-engineer",
  "last_reviewed": "2026-09-13",
  "expert_review": {
    "status": "not_applicable",
    "reviewer": null,
    "note": "Internal domain review completed; not a named external expert review.",
    "kind": "internal"
  },
  "internal_review": {
    "status": "approved",
    "reviewer": {
      "name": "CalculatorX electrical review",
      "role": "electrical-engineer"
    },
    "reviewed_at": "2026-09-13",
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "kind": "internal"
  },
  "page": "https://www.calculatorx.com/calc/electric/diode-equation",
  "api": "https://www.calculatorx.com/api/v1/calc/diode-equation",
  "schema_input": "https://www.calculatorx.com/schemas/electrical.diode.equation.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/electrical.diode.equation.output.json",
  "assumptions": [
    "Ideal Shockley; no series Rs, breakdown, recombination extras, or high-injection",
    "I_S is the saturation current at the selected junction temperature; I_S(T) is not derived"
  ],
  "limitations": [
    "Ideal Shockley; no Rs/breakdown/high-injection",
    "Is is specified at T; Is(T) is not derived",
    "mode=vd requires Id > -Is",
    "binary64 overflow → NUMERIC_OVERFLOW"
  ],
  "boundary_conditions": [
    "Is,n,T ≤0 → VALUE_MUST_BE_POSITIVE",
    "mode=vd and Id ≤ -Is → VALUE_OUT_OF_RANGE",
    "binary64 overflow of expm1/log1p → NUMERIC_OVERFLOW"
  ],
  "sources": [
    {
      "title": "Shockley — The theory of p–n junctions in semiconductors and p–n junction transistors",
      "section": "Bell System Technical Journal 28(3), 1949",
      "url": "https://doi.org/10.1002/j.1538-7305.1949.tb03645.x",
      "supports": "Ideal exponential Id–Vd relationship of a p–n junction",
      "kind": "reference",
      "accessed": "2026-09-13",
      "publisher": "Bell System Technical Journal",
      "published": "1949"
    },
    {
      "title": "CODATA 2022 — Boltzmann constant k",
      "section": "Fundamental Physical Constants",
      "url": "https://physics.nist.gov/cuu/Constants/Value/k.html",
      "supports": "Vt = kT/q thermal voltage",
      "kind": "reference",
      "accessed": "2026-09-14",
      "publisher": "NIST"
    },
    {
      "title": "CODATA 2022 — elementary charge e",
      "section": "Fundamental Physical Constants",
      "url": "https://physics.nist.gov/cuu/Constants/Value/e.html",
      "supports": "Vt = kT/q thermal voltage",
      "kind": "reference",
      "accessed": "2026-09-14",
      "publisher": "NIST"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:fc82f7c2c6e183ced77f89b0b803cd01f2d9689ef4c4a3de8c82e173fa0599f3",
  "tests": [
    {
      "id": "fwd",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "id",
        "Vd": 0.7,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300
      },
      "expect": {
        "Id": 0.5747545691036834
      },
      "expectWarning": null,
      "actual": {
        "mode": "id",
        "Vd": 0.7,
        "Id": 0.5747545691036834,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300,
        "Vt": 0.025851999786435535
      },
      "tol": 0.000001
    },
    {
      "id": "roundtrip-vd",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "vd",
        "Id": 0.001,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300
      },
      "expect": {
        "Vd": 0.5357378640168374
      },
      "expectWarning": null,
      "actual": {
        "mode": "vd",
        "Vd": 0.5357378640168374,
        "Id": 0.001,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300,
        "Vt": 0.025851999786435535
      },
      "tol": 1e-9
    },
    {
      "id": "bad-Is",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "id",
        "Vd": 0.7,
        "Is": 0
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "Is must be greater than zero"
    },
    {
      "id": "soft-zero-vd",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "id",
        "Vd": 0,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300
      },
      "expect": {
        "Id": 0
      },
      "expectWarning": null,
      "actual": {
        "mode": "id",
        "Vd": 0,
        "Id": 0,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300,
        "Vt": 0.025851999786435535
      },
      "tol": 1e-18
    },
    {
      "id": "id-zero",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "vd",
        "Id": 0,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300
      },
      "expect": {
        "Vd": 0
      },
      "expectWarning": null,
      "actual": {
        "mode": "vd",
        "Vd": 0,
        "Id": 0,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300,
        "Vt": 0.025851999786435535
      },
      "tol": 1e-18
    },
    {
      "id": "reverse-half-Is",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "vd",
        "Id": -5e-13,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300
      },
      "expect": {
        "Vd": -0.0179192407638041
      },
      "expectWarning": null,
      "actual": {
        "mode": "vd",
        "Vd": -0.0179192407638041,
        "Id": -5e-13,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300,
        "Vt": 0.025851999786435535
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-diode-small-x",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "id",
        "Vd": 1e-12,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300
      },
      "expect": {
        "Id": 3.8681727072581744e-23
      },
      "expectWarning": null,
      "actual": {
        "mode": "id",
        "Vd": 1e-12,
        "Id": 3.8681727072581744e-23,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300,
        "Vt": 0.025851999786435535
      },
      "tol": 1e-30
    },
    {
      "id": "boundary-diode-n",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "id",
        "Vd": 0.7,
        "Is": 1e-12,
        "n": 0,
        "T_K": 300
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "n must be greater than zero"
    },
    {
      "id": "boundary-diode-T",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "id",
        "Vd": 0.7,
        "Is": 1e-12,
        "n": 1,
        "T_K": 0
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "T_K must be greater than zero"
    },
    {
      "id": "boundary-diode-Id-domain",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "vd",
        "Id": -1e-12,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "Id must be greater than -Is (Shockley inverse domain)"
    },
    {
      "id": "boundary-diode-overflow",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "id",
        "Vd": 20,
        "Is": 1e-12,
        "n": 1,
        "T_K": 300
      },
      "expectError": "NUMERIC_OVERFLOW",
      "code": "NUMERIC_OVERFLOW",
      "error": "Shockley exponential overflowed binary64"
    },
    {
      "id": "property-id",
      "ok": true,
      "kind": "property",
      "detail": "Shockley Id",
      "expect": 0.5747545691036834,
      "actual": 0.5747545691036834
    },
    {
      "id": "property-roundtrip",
      "ok": true,
      "kind": "property",
      "detail": "inverse recovers Vd",
      "expect": 0.7,
      "actual": 0.7
    },
    {
      "id": "property-id-zero",
      "ok": true,
      "kind": "property",
      "detail": "Id=0→Vd=0",
      "expect": 0,
      "actual": 0
    },
    {
      "id": "property-reverse",
      "ok": true,
      "kind": "property",
      "detail": "Id=-0.5 Is",
      "expect": -0.0179192407638041,
      "actual": -0.0179192407638041
    }
  ],
  "tier": "internally_reviewed",
  "verification": {
    "tests": {
      "passed": 15,
      "total": 15,
      "golden": 5,
      "boundary": 6,
      "property": 4
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-12T22:51:46.658Z",
  "rendered_at": "2026-09-16T22:03:43.729Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.1.0",
    "artifacts": {
      "engine": "1.1.0",
      "page": "1.1.0",
      "capability": "1.1.0",
      "evidence": "1.1.0",
      "input_schema": "1.1.0",
      "output_schema": "1.1.0",
      "mcp_contract": "1.1.0"
    },
    "digests": {
      "input_schema_sha256": "0d09a1811597bcb8e9ac11e11c59ade2a938a949011800cf5c13af56be3d58d0",
      "output_schema_sha256": "765f987f71f4acf69f378cc438657d8325ff6a6ac883763d79d2a92110199837",
      "evidence_sha256": "a6cdfa02931e123d235d1252d07150bf229ff8a18d2a1d4468a367eda832f188",
      "evidence_core_sha256": "a6cdfa02931e123d235d1252d07150bf229ff8a18d2a1d4468a367eda832f188",
      "capability_sha256": "7ba61f1649b7b8082101f858a69e98fcd197c59862d3476f961f0c3e06c32e97",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.1.0"
        },
        {
          "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"
  }
}
