{
  "capability_id": "electrical.opamp_gain",
  "tool_id": "opamp-gain",
  "engine": "opamp-gain",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-16T22:03:43.726Z",
  "engine_build": "2026-09-10",
  "test_count": 6,
  "passed": 6,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 3,
      "passed": 3
    },
    "boundary": {
      "total": 2,
      "passed": 2
    },
    "property": {
      "total": 1,
      "passed": 1
    }
  },
  "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/opamp-gain",
  "api": "https://www.calculatorx.com/api/v1/calc/opamp-gain",
  "schema_input": "https://www.calculatorx.com/schemas/electrical.opamp_gain.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/electrical.opamp_gain.output.json",
  "assumptions": [],
  "limitations": [
    "Ideal DC closed-loop only"
  ],
  "boundary_conditions": [
    "Rf or Rg ≤0 → VALUE_MUST_BE_POSITIVE",
    "Bad mode → INVALID_MODE"
  ],
  "sources": [
    {
      "title": "Sedra/Smith — Microelectronic Circuits",
      "section": "Ideal closed-loop gain",
      "supports": "Non-inverting and inverting gain formulas",
      "kind": "reference"
    },
    {
      "title": "Horowitz & Hill — The Art of Electronics",
      "section": "Op-amp circuits",
      "supports": "Ideal non-inverting / inverting closed-loop gain",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:51a3f5c4222ebb21e609d2588c943278430b9c1b035f17248dbd6cdc90d2b83b",
  "tests": [
    {
      "id": "noninv-11",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "noninverting",
        "Rf_ohm": 10000,
        "Rg_ohm": 1000
      },
      "expect": {
        "G": 11,
        "G_abs": 11
      },
      "expectWarning": null,
      "actual": {
        "mode": "noninverting",
        "Rf_ohm": 10000,
        "Rg_ohm": 1000,
        "G": 11,
        "G_abs": 11,
        "G_dB": 20.8278537031645
      },
      "tol": 1e-12
    },
    {
      "id": "inv-10",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "inverting",
        "Rf_ohm": 10000,
        "Rg_ohm": 1000
      },
      "expect": {
        "G": -10,
        "G_abs": 10
      },
      "expectWarning": null,
      "actual": {
        "mode": "inverting",
        "Rf_ohm": 10000,
        "Rg_ohm": 1000,
        "G": -10,
        "G_abs": 10,
        "G_dB": 20
      },
      "tol": 1e-12
    },
    {
      "id": "unity-noninv",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "noninverting",
        "Rf_ohm": 0.001,
        "Rg_ohm": 1000000000
      },
      "expect": {
        "G_abs": 1
      },
      "expectWarning": null,
      "actual": {
        "mode": "noninverting",
        "Rf_ohm": 0.001,
        "Rg_ohm": 1000000000,
        "G": 1.000000000001,
        "G_abs": 1.000000000001,
        "G_dB": 8.686661818707667e-12
      },
      "tol": 0.000001
    },
    {
      "id": "bad-Rf",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "Rf_ohm": 0,
        "Rg_ohm": 1000
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "Rf_ohm must be greater than zero"
    },
    {
      "id": "boundary-opamp-gain",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "Rf_ohm": 10000,
        "Rg_ohm": 1000
      },
      "expect": {
        "G": 11
      },
      "expectWarning": null,
      "actual": {
        "mode": "noninverting",
        "Rf_ohm": 10000,
        "Rg_ohm": 1000,
        "G": 11,
        "G_abs": 11,
        "G_dB": 20.8278537031645
      },
      "tol": 1e-12
    },
    {
      "id": "property-opamp-gain",
      "ok": true,
      "kind": "property",
      "detail": "11",
      "expect": 11,
      "actual": 11
    }
  ],
  "tier": "expert_verified",
  "verification": {
    "tests": {
      "passed": 6,
      "total": 6,
      "golden": 3,
      "boundary": 2,
      "property": 1
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-06T13:16:40.891Z",
  "rendered_at": "2026-09-16T22:03:43.726Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.0",
    "artifacts": {
      "engine": "1.0.0",
      "page": "1.0.0",
      "capability": "1.0.0",
      "evidence": "1.0.0",
      "input_schema": "1.0.0",
      "output_schema": "1.0.0",
      "mcp_contract": "1.0.0"
    },
    "digests": {
      "input_schema_sha256": "7045f85f7da9d374f8aeb91a99e05846332835e6d663ce7560263e24a826e9ee",
      "output_schema_sha256": "50cda2100910ffd822823d377eaf9ebbf7aac4f6c19836d06e5daa01a14454ab",
      "evidence_sha256": "7d5192479844dc85de95528c8f403619d1aa28451819f09ae723ca7412cab2d9",
      "evidence_core_sha256": "7d5192479844dc85de95528c8f403619d1aa28451819f09ae723ca7412cab2d9",
      "capability_sha256": "d40620b0bd148d82c33d2d182230d963e860e5f958ab4f76200c2e7e9387f281",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.0.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"
  }
}
