{
  "capability_id": "math.log",
  "tool_id": "log",
  "engine": "log",
  "calculation_version": "1.1.5",
  "generated_at": "2026-09-16T22:03:43.773Z",
  "engine_build": "2026-09-10",
  "test_count": 45,
  "passed": 45,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 22,
      "passed": 22
    },
    "boundary": {
      "total": 23,
      "passed": 23
    },
    "property": {
      "total": 0,
      "passed": 0
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": false,
  "review_kind": null,
  "source_checked": true,
  "reviewed_by": null,
  "reviewer_role": null,
  "last_reviewed": null,
  "expert_review": {
    "status": "optional_not_performed",
    "reviewer": null,
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "note": "Domain expert review is optional under CVP (CVP-EXP-01). Absence does not block CVP Verified. See Review policy for supplemental domain assurance."
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/math/log",
  "api": "https://www.calculatorx.com/api/v1/calc/log",
  "schema_input": "https://www.calculatorx.com/schemas/math.log.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.log.output.json",
  "assumptions": [
    "Real arithmetic; argument x > 0; base b > 0 and b ≠ 1.",
    "Unspecified log is common (base 10). ln is the dedicated natural-log page; this engine also accepts base e.",
    "UI, SSR share URLs, REST, and validation cases all call this same three-mode engine.",
    "When b, x, and y are all present with no explicit solve_for, the engine computes y and ignores the extra y (legacy share URLs)."
  ],
  "limitations": [
    "Real logarithm only: x > 0; b > 0 and b ≠ 1 (including 0 < b < 1)",
    "Missing scalar → MISSING_REQUIRED_INPUT / INVALID_NUMBER",
    "Invalid base → INVALID_BASE; x ≤ 0 → INVALID_ARGUMENT",
    "Solve-for-b edge cases → NON_UNIQUE_BASE / NO_REAL_SOLUTION / RESULT_OVERFLOW"
  ],
  "boundary_conditions": [
    "Invalid given base (≤ 0 or 1) returns INVALID_BASE.",
    "x ≤ 0 returns INVALID_ARGUMENT (real log is undefined).",
    "0 < b < 1 is valid (for example log_{0.5}(0.25) = 2 and inverse x = 0.5² = 0.25).",
    "x = 1 returns y = 0 for every valid base; x = b returns y = 1.",
    "Solving for b with x = 1 and y = 0 returns NON_UNIQUE_BASE (any valid base satisfies b⁰ = 1).",
    "Solving for b with x ≠ 1 and y = 0 returns NO_REAL_SOLUTION.",
    "Solving for b when the only real candidate is b = 1 (x = 1, y ≠ 0) returns NO_REAL_SOLUTION.",
    "Extreme inputs that overflow or underflow IEEE-754 return RESULT_OVERFLOW / RESULT_UNDERFLOW, not Infinity or 0.",
    "Invalid solve_for returns INVALID_SOLVE_FOR.",
    "Missing both x and y returns MISSING_REQUIRED_INPUT."
  ],
  "sources": [
    {
      "title": "NIST Digital Library of Mathematical Functions, Chapter 4",
      "section": "Logarithm, Exponential, Powers",
      "url": "https://dlmf.nist.gov/4",
      "supports": "Logarithm as the inverse of the exponential; log_b(x)=y ⇔ b^y=x",
      "kind": "reference"
    },
    {
      "title": "NIST DLMF §4.2",
      "section": "Logarithm: definitions and inverse of the exponential",
      "url": "https://dlmf.nist.gov/4.2",
      "supports": "b^(log_b x) = x and log_b(b^y) = y for valid real b and x > 0",
      "kind": "reference"
    },
    {
      "title": "CalculatorX mathematical conventions",
      "section": "Common (base 10), natural (base e), and real bases b > 0, b ≠ 1",
      "supports": "Unspecified log is common (base 10); custom bases may be in (0, 1); real log requires x > 0",
      "kind": "definition"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:bcb7a82f169cf93207a2650382b83eb6ff3e999dc0f1b4d87181c3b4ff5d8ad2",
  "tests": [
    {
      "id": "common-100",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 100,
        "base": "10"
      },
      "expect": 2,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 2,
        "b": 10,
        "x": 100,
        "y": 2,
        "base_label": "10",
        "base_mode": "common"
      },
      "tol": 0
    },
    {
      "id": "common-2",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 2,
        "base": 10
      },
      "expect": 0.3010299956639812,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 0.3010299956639812,
        "b": 10,
        "x": 2,
        "y": 0.3010299956639812,
        "base_label": "10",
        "base_mode": "common"
      },
      "tol": 1e-12
    },
    {
      "id": "natural-e",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": "e",
        "base": "e"
      },
      "expect": 1,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 1,
        "b": 2.718281828459045,
        "x": 2.718281828459045,
        "y": 1,
        "base_label": "e",
        "base_mode": "natural"
      },
      "tol": 1e-12
    },
    {
      "id": "binary-8",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 8,
        "base": "2"
      },
      "expect": 3,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 3,
        "b": 2,
        "x": 8,
        "y": 3,
        "base_label": "2",
        "base_mode": "binary"
      },
      "tol": 0
    },
    {
      "id": "common-neg2",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 0.01,
        "base": 10
      },
      "expect": -2,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": -2,
        "b": 10,
        "x": 0.01,
        "y": -2,
        "base_label": "10",
        "base_mode": "common"
      },
      "tol": 1e-12
    },
    {
      "id": "x-one",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 1,
        "base": 10
      },
      "expect": 0,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 0,
        "b": 10,
        "x": 1,
        "y": 0,
        "base_label": "10",
        "base_mode": "common"
      },
      "tol": 0
    },
    {
      "id": "base-lt-one",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 0.25,
        "b": 0.5
      },
      "expect": 2,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 2,
        "b": 0.5,
        "x": 0.25,
        "y": 2,
        "base_label": "0.5",
        "base_mode": "custom"
      },
      "tol": 0
    },
    {
      "id": "base-lt-one-reciprocal",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 4,
        "b": 0.5
      },
      "expect": -2,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": -2,
        "b": 0.5,
        "x": 4,
        "y": -2,
        "base_label": "0.5",
        "base_mode": "custom"
      },
      "tol": 0
    },
    {
      "id": "decimal-custom",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 2.25,
        "b": 1.5
      },
      "expect": 2,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 2,
        "b": 1.5,
        "x": 2.25,
        "y": 2,
        "base_label": "1.5",
        "base_mode": "custom"
      },
      "tol": 1e-12
    },
    {
      "id": "change-of-base-5",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 2,
        "b": 5
      },
      "expect": 0.43067655807339306,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 0.43067655807339306,
        "b": 5,
        "x": 2,
        "y": 0.43067655807339306,
        "base_label": "5",
        "base_mode": "custom"
      },
      "tol": 1e-12
    },
    {
      "id": "invalid-base-1",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 100,
        "b": 1
      },
      "expectError": "INVALID_BASE",
      "code": "INVALID_BASE",
      "error": "Base must be positive and not equal to 1."
    },
    {
      "id": "invalid-base-0",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 100,
        "b": 0
      },
      "expectError": "INVALID_BASE",
      "code": "INVALID_BASE",
      "error": "Base must be positive and not equal to 1."
    },
    {
      "id": "invalid-base-neg",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 100,
        "b": -2
      },
      "expectError": "INVALID_BASE",
      "code": "INVALID_BASE",
      "error": "Base must be positive and not equal to 1."
    },
    {
      "id": "x-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 0,
        "base": 10
      },
      "expectError": "INVALID_ARGUMENT",
      "code": "INVALID_ARGUMENT",
      "error": "Argument x must be greater than 0."
    },
    {
      "id": "x-neg",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": -1,
        "base": 10
      },
      "expectError": "INVALID_ARGUMENT",
      "code": "INVALID_ARGUMENT",
      "error": "Argument x must be greater than 0."
    },
    {
      "id": "empty-x",
      "ok": true,
      "kind": "boundary",
      "inputs": {},
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "Enter any two of base b, argument x, and logarithm y."
    },
    {
      "id": "near-base-one",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 2,
        "b": 1.000000000000001
      },
      "expect": 624331476816536.2,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 624331476816536.2,
        "b": 1.000000000000001,
        "x": 2,
        "y": 624331476816536.2,
        "base_label": "1.000000000000001",
        "base_mode": "custom"
      },
      "tol": 1e-12
    },
    {
      "id": "tiny-positive-x",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 1e-100,
        "base": 10
      },
      "expect": -100,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": -100,
        "b": 10,
        "x": 1e-100,
        "y": -100,
        "base_label": "10",
        "base_mode": "common"
      },
      "tol": 1e-12
    },
    {
      "id": "log2-cbrt-two",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 1.2599210498948732,
        "base": 2
      },
      "expect": 0.3333333333333333,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 0.33333333333333337,
        "b": 2,
        "x": 1.2599210498948732,
        "y": 0.33333333333333337,
        "base_label": "2",
        "base_mode": "binary"
      },
      "tol": 1e-12
    },
    {
      "id": "large-finite",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 1e+308,
        "base": 10
      },
      "expect": 308,
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 308,
        "b": 10,
        "x": 1e+308,
        "y": 308,
        "base_label": "10",
        "base_mode": "common"
      },
      "tol": 1e-12
    },
    {
      "id": "x-infinity",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": "Infinity",
        "base": 10
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "x-nan",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": "NaN",
        "base": 10
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "x-abc",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": "abc",
        "base": 10
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "x-whitespace",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": "   ",
        "base": 10
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "Enter any two of base b, argument x, and logarithm y."
    },
    {
      "id": "x-null",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": null,
        "base": 10
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "Enter any two of base b, argument x, and logarithm y."
    },
    {
      "id": "x-object",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": {},
        "base": 10
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "x-array",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": [],
        "base": 10
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "x-boolean",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": true,
        "base": 10
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "b-object",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 100,
        "b": {}
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Base must be a finite number."
    },
    {
      "id": "b-array",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 100,
        "b": []
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Base must be a finite number."
    },
    {
      "id": "solve-x-common-1000",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "base": 10,
        "y": 3
      },
      "expect": {
        "solve_for": "x",
        "value": 1000,
        "x": 1000
      },
      "expectWarning": null,
      "actual": {
        "solve_for": "x",
        "value": 1000,
        "b": 10,
        "x": 1000,
        "y": 3,
        "base_label": "10",
        "base_mode": "common"
      },
      "tol": 0
    },
    {
      "id": "solve-x-binary-1024",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "b": 2,
        "y": 10
      },
      "expect": {
        "solve_for": "x",
        "value": 1024
      },
      "expectWarning": null,
      "actual": {
        "solve_for": "x",
        "value": 1024,
        "b": 2,
        "x": 1024,
        "y": 10,
        "base_label": "2",
        "base_mode": "binary"
      },
      "tol": 0
    },
    {
      "id": "solve-x-half",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "b": 0.5,
        "y": 2
      },
      "expect": {
        "solve_for": "x",
        "value": 0.25
      },
      "expectWarning": null,
      "actual": {
        "solve_for": "x",
        "value": 0.25,
        "b": 0.5,
        "x": 0.25,
        "y": 2,
        "base_label": "0.5",
        "base_mode": "custom"
      },
      "tol": 1e-12
    },
    {
      "id": "solve-x-explicit",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "base": 10,
        "y": 3,
        "solve_for": "x"
      },
      "expect": 1000,
      "expectWarning": null,
      "actual": {
        "solve_for": "x",
        "value": 1000,
        "b": 10,
        "x": 1000,
        "y": 3,
        "base_label": "10",
        "base_mode": "common"
      },
      "tol": 0
    },
    {
      "id": "solve-b-common-10",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 100,
        "y": 2
      },
      "expect": {
        "solve_for": "b",
        "value": 10,
        "b": 10
      },
      "expectWarning": null,
      "actual": {
        "solve_for": "b",
        "value": 10,
        "b": 10,
        "x": 100,
        "y": 2,
        "base_label": "10",
        "base_mode": "common"
      },
      "tol": 0
    },
    {
      "id": "solve-b-binary-2",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 8,
        "y": 3
      },
      "expect": {
        "solve_for": "b",
        "value": 2
      },
      "expectWarning": null,
      "actual": {
        "solve_for": "b",
        "value": 2,
        "b": 2,
        "x": 8,
        "y": 3,
        "base_label": "2",
        "base_mode": "binary"
      },
      "tol": 1e-12
    },
    {
      "id": "solve-b-half",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 0.25,
        "y": 2
      },
      "expect": {
        "solve_for": "b",
        "value": 0.5
      },
      "expectWarning": null,
      "actual": {
        "solve_for": "b",
        "value": 0.5,
        "b": 0.5,
        "x": 0.25,
        "y": 2,
        "base_label": "0.5",
        "base_mode": "custom"
      },
      "tol": 1e-12
    },
    {
      "id": "solve-b-non-unique",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 1,
        "y": 0
      },
      "expectError": "NON_UNIQUE_BASE",
      "code": "NON_UNIQUE_BASE",
      "error": "Any valid base satisfies b⁰ = 1. The base is not unique."
    },
    {
      "id": "solve-b-y-zero-x-not-one",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 2,
        "y": 0
      },
      "expectError": "NO_REAL_SOLUTION",
      "code": "NO_REAL_SOLUTION",
      "error": "No real base satisfies b⁰ = x when x ≠ 1."
    },
    {
      "id": "solve-b-x-one-invalid",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 1,
        "y": 5
      },
      "expectError": "NO_REAL_SOLUTION",
      "code": "NO_REAL_SOLUTION",
      "error": "The only non-negative solution is b = 1, which is not a valid log base."
    },
    {
      "id": "solve-x-overflow",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "base": 10,
        "y": 400
      },
      "expectError": "RESULT_OVERFLOW",
      "code": "RESULT_OVERFLOW",
      "error": "Result overflowed or is undefined for these inputs."
    },
    {
      "id": "solve-x-underflow",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "base": 10,
        "y": -400
      },
      "expectError": "RESULT_UNDERFLOW",
      "code": "RESULT_UNDERFLOW",
      "error": "Result underflowed to zero for these inputs."
    },
    {
      "id": "solve-b-overflow",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 1e+308,
        "y": 0.001
      },
      "expectError": "RESULT_OVERFLOW",
      "code": "RESULT_OVERFLOW",
      "error": "Result overflowed or is undefined for these inputs."
    },
    {
      "id": "three-filled-defaults-to-y",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "x": 100,
        "base": 10,
        "y": 99
      },
      "expect": {
        "solve_for": "y",
        "value": 2
      },
      "expectWarning": null,
      "actual": {
        "solve_for": "y",
        "value": 2,
        "b": 10,
        "x": 100,
        "y": 2,
        "base_label": "10",
        "base_mode": "common"
      },
      "tol": 0
    },
    {
      "id": "invalid-solve-for",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "x": 100,
        "base": 10,
        "solve_for": "z"
      },
      "expectError": "INVALID_SOLVE_FOR",
      "code": "INVALID_SOLVE_FOR",
      "error": "solve_for must be y, x, or b."
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 45,
      "total": 45,
      "golden": 22,
      "boundary": 23,
      "property": 0
    },
    "contract_checks": {
      "passed": 3,
      "total": 3
    }
  },
  "evidence_core_generated_at": "2026-09-10T22:48:17.762Z",
  "rendered_at": "2026-09-16T22:03:43.773Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.1.5",
    "artifacts": {
      "engine": "1.1.5",
      "page": "1.1.5",
      "capability": "1.1.5",
      "evidence": "1.1.5",
      "input_schema": "1.1.5",
      "output_schema": "1.1.5",
      "mcp_contract": "1.1.5"
    },
    "digests": {
      "input_schema_sha256": "7d087522bac508a630ba719d929a8cfa2f64c8522e6ea08ee051bd5d4cd66b7c",
      "output_schema_sha256": "8ff71d8c30e992a2dbca0e8d464116bdd8233e7a9de147a2689611f33b5a42ca",
      "evidence_sha256": "ca8f3508c00b6c7717b8c99a03426fe2bb60152c5624e31c73aef9ee1de0669b",
      "evidence_core_sha256": "ca8f3508c00b6c7717b8c99a03426fe2bb60152c5624e31c73aef9ee1de0669b",
      "capability_sha256": "f5ce657f12099eadc4766d4bbf6866e3254c36f98ce909b73d1830a1f591b99a",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 3,
      "passed": 3,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.1.5"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
