{
  "protocol": {
    "name": "CVP",
    "version": "1.0.0-proposed"
  },
  "document_status": "proposed",
  "calculator": {
    "id": "percent-error",
    "version": "1.1.4",
    "title": "Percent Error Calculator",
    "formula_family": "percent_error",
    "capability_id": "math.percent_error"
  },
  "profile": "engineering",
  "status": "VERIFIED",
  "runner": {
    "name": "cvp-runner",
    "version": "1.0.0"
  },
  "environment": {
    "runtime": "node",
    "runtime_version": "20.19.2",
    "numeric_model": "IEEE-754 binary64",
    "os": "darwin"
  },
  "suite": {
    "id": "percent-error",
    "version": "1.1.4",
    "uri": "https://www.calculatorx.com/evidence/math.percent_error/1.1.4.json"
  },
  "obligation_set": [
    "CVP-PROV-01",
    "CVP-MODEL-01",
    "CVP-SCOPE-01",
    "CVP-UNIT-01",
    "CVP-REF-01",
    "CVP-GOLD-01",
    "CVP-BND-01",
    "CVP-INV-01",
    "CVP-NUM-01",
    "CVP-COV-01",
    "CVP-CONTRACT-01",
    "CVP-DEP-01",
    "CVP-ART-01",
    "CVP-PROD-01",
    "CVP-DIM-01",
    "CVP-PROP-01",
    "CVP-META-01",
    "CVP-ROUND-01",
    "CVP-IFACE-01"
  ],
  "provenance": {
    "mode": "direct",
    "sources": [
      {
        "label": "JCGM 200:2012 — International vocabulary of metrology (VIM)",
        "kind": "other",
        "reference": "§2.16 measurement error",
        "url": "https://www.bipm.org/en/committees/jc/jcgm/publications"
      },
      {
        "label": "NIST Dataplot PERCERR",
        "kind": "other",
        "reference": "Percent error of a true/accepted value vs an observed value",
        "url": "https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/percerr.htm"
      },
      {
        "label": "NIST Dataplot RELERR",
        "kind": "other",
        "reference": "Relative error of a true/accepted value vs an observed value",
        "url": "https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/relerr.htm"
      },
      {
        "label": "CalculatorX laboratory convention",
        "kind": "other",
        "reference": "Absolute-value percent error, signed opt-in, and reverse-solve states"
      }
    ]
  },
  "reference": {
    "items": [
      {
        "class": "O1",
        "reference_scope": "model",
        "scope": "model",
        "label": "Laboratory percent error vs accepted value"
      },
      {
        "class": "O2",
        "reference_scope": "expected_values",
        "scope": "expected_values",
        "label": "Separate-module percent-error oracle (full inverse solution set)",
        "engine": {
          "name": "percent-error-reference",
          "precision_bits": 53,
          "independent_of_iut": true,
          "same_runtime_as_iut": true,
          "source": "/developers/cvp/reproduce/percent-error-reference.mjs"
        }
      },
      {
        "class": "O2",
        "reference_scope": "numerical_behavior",
        "scope": "numerical_behavior",
        "label": "Same O2 module backs ≤2 ULP value and candidate-set comparison vs IUT",
        "engine": {
          "name": "percent-error-reference",
          "precision_bits": 53,
          "independent_of_iut": true,
          "same_runtime_as_iut": true,
          "source": "/developers/cvp/reproduce/percent-error-reference.mjs"
        }
      }
    ],
    "notes": "Golden expected values come from scripts/lib/cvp/oracles/percent-error-reference.mjs (also published at /developers/cvp/reproduce/percent-error-reference.mjs). That module MUST NOT import the IUT. It shares Node/V8 binary64 with the IUT — declared via same_runtime_as_iut. Inverse expected objects include candidates, solution_type, status, and error codes. Reproduce: node public/developers/cvp/reproduce/check-percent-error-o2.mjs"
  },
  "controls": {
    "CVP-PROV-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "Sources present on evidence"
    },
    "CVP-MODEL-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "|O−T|/|T|×100% (signed opt-in); inverse publishes the full candidate set"
    },
    "CVP-SCOPE-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "T≠0; solve_for p|o|t; all three fields verify; absolute reverse-solves are multi-valued"
    },
    "CVP-UNIT-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "percent"
    },
    "CVP-REF-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "O1 model + O2 expected_values + O2 numerical_behavior"
    },
    "CVP-GOLD-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "10/10 legacy golden; 6/6 oracle-backed numeric"
    },
    "CVP-BND-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "4/4 boundary"
    },
    "CVP-INV-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "4 invalid-domain cases"
    },
    "CVP-NUM-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "max_error_observed_ulp=0; policy declared a priori"
    },
    "CVP-COV-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "5/5 declared partitions (forward, inverse-observed, inverse-true, verify, invalid-domain) · 10 golden / 4 boundary unique cases · 4 Evidence invalid-input (may overlap boundary)"
    },
    "CVP-CONTRACT-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "1/1 contract checks"
    },
    "CVP-DEP-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "engine percent-error; Node binary64"
    },
    "CVP-ART-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "release_integrity.status=verified · evidence_digest=CVP verification fingerprint v2 (canonical inputs, expected/actual/status, policy, versions; independent of generated_at) · evidence_bundle_sha256=legacy Evidence JSON bytes · production_sha256=bound production attestation report"
    },
    "CVP-PROD-01": {
      "result": "PASS",
      "applicability": "required",
      "notes": "CURRENT · site report pass · local checks pass · attestation_id=00c818a77ba026c2d6aa3f7402680cd2dac2a40a816209600bc3c3fcd0b8921c · CURRENT · Public schema 1.1.4 matches · Semantic contract ✓ · Production attested · Public/cache ✓ · Origin ✓ · schema_const=1.1.4 · report output-const=pass · evidence-sha256=pass · semantic-contract=pass · capability-html-public-origin-agree=pass · cvp-manifest-public-origin-agree=pass · cvp-reproduce-manifest-agree=pass · calculator-html-cvp-projection=pass · evidence-html-cvp-projection=pass · attested_evidence_sha256=9424f31d3ca937ec4a453e41479201945df6495214f0a220ebb742e7fd1c3f20"
    },
    "CVP-DIM-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "relative measurement error"
    },
    "CVP-PROP-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "3/3 property"
    },
    "CVP-META-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "1/1 metamorphic"
    },
    "CVP-ROUND-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "7/7 round-trips"
    },
    "CVP-XCAL-01": {
      "result": "SKIP",
      "applicability": "not_applicable",
      "notes": "No related calculator in the same formula family / no related-identity peers declared — control not in obligation set"
    },
    "CVP-IFACE-01": {
      "result": "PASS",
      "applicability": "applicable",
      "notes": "UI (SSR) · REST · MCP equivalent (MCP uses calc API handler). ui-ssr is query-result HTML, not a live browser session."
    },
    "CVP-ORACLE-01": {
      "result": "SKIP",
      "applicability": "higher_assurance",
      "notes": "O2 present; O3 not required this wave"
    },
    "CVP-EXP-01": {
      "result": "SKIP",
      "applicability": "optional",
      "notes": "expert_reviewed=false"
    }
  },
  "tests": {
    "golden": {
      "passed": 6,
      "total": 6,
      "failed": 0,
      "case_ids": [
        "g-basic",
        "g-solve-o",
        "g-solve-t-two",
        "g-signed",
        "g-infinite-t",
        "g-p100-t"
      ]
    },
    "boundary": {
      "passed": 4,
      "total": 4,
      "failed": 0,
      "case_ids": [
        "zero-true",
        "no-sol-t",
        "no-sol-t-signed-p",
        "no-sol-t-signed-o0"
      ]
    },
    "invalid": {
      "passed": 4,
      "total": 4,
      "failed": 0,
      "case_ids": [
        "zero-true",
        "no-sol-t",
        "no-sol-t-signed-p",
        "no-sol-t-signed-o0"
      ]
    },
    "property": {
      "passed": 3,
      "total": 3,
      "failed": 0,
      "case_ids": [
        "prop-nonneg",
        "prop-exact",
        "prop-solve-o-set"
      ],
      "definition_ids": [
        "abs-error-nonnegative",
        "zero-when-equal",
        "absolute-inverse-two-candidates"
      ]
    },
    "round_trip": {
      "passed": 7,
      "total": 7,
      "failed": 0,
      "case_ids": [
        "rt-fwd-inv-o",
        "rt-fwd-inv-o-set",
        "rt-fwd-inv-t",
        "rt-fwd-inv-t-set",
        "rt-fwd-inv-signed-o",
        "rt-inv-fwd-o98",
        "rt-inv-fwd-o102"
      ]
    },
    "metamorphic": {
      "passed": 1,
      "total": 1,
      "failed": 0,
      "case_ids": [
        "meta-scale-both"
      ],
      "definition_ids": [
        "scale-both"
      ]
    },
    "contract": {
      "passed": 1,
      "total": 1,
      "failed": 0
    },
    "cross_interface": {
      "passed": 1,
      "total": 1,
      "failed": 0,
      "case_ids": [
        "iface-pe"
      ]
    }
  },
  "coverage": {
    "partitions": [
      {
        "id": "forward",
        "description": "Forward |O−T|/|T|×100%",
        "exercised": true,
        "case_count": 15
      },
      {
        "id": "inverse-observed",
        "description": "Solve observed O",
        "exercised": true,
        "case_count": 5
      },
      {
        "id": "inverse-true",
        "description": "Solve accepted T",
        "exercised": true,
        "case_count": 6
      },
      {
        "id": "verify",
        "description": "Three-field verify",
        "exercised": true,
        "case_count": 1
      },
      {
        "id": "invalid-domain",
        "description": "Invalid inputs",
        "exercised": true,
        "case_count": 4
      }
    ]
  },
  "numerical": {
    "representation": "IEEE-754 binary64 percent error",
    "tolerance": {
      "type": "ulp",
      "value": 2,
      "rationale": "Independent |O−T|/|T|×100 vs IUT; ≤2 ULP on value and each inverse candidate. Declared a priori.",
      "declared_before_evaluation": true
    },
    "max_error_observed": 0,
    "records": [
      {
        "id": "g-basic",
        "reference": {
          "solve_for": "p",
          "value": 1.5,
          "observed": 101.5,
          "true": 100,
          "percent_error": 1.5,
          "status": "success",
          "solution_type": "unique",
          "absolute": true
        },
        "actual": {
          "solve_for": "p",
          "value": 1.5,
          "observed": 101.5,
          "true": 100,
          "percent_error": 1.5,
          "absolute_error": 1.5,
          "relative_error": 0.015,
          "signed_percent_error": 1.5,
          "absolute": true,
          "direction": "observed_above",
          "status": "success",
          "solution_type": "unique",
          "rounding": {
            "mode": "auto",
            "significant_digits": 10,
            "trailing_zeros": "stripped"
          },
          "display": {
            "percent_error": "1.5%",
            "value": "1.5"
          }
        },
        "error_ulp": 0,
        "threshold_ulp": 2,
        "fields": {
          "status": {
            "ok": true
          },
          "solution_type": {
            "ok": true
          },
          "value": {
            "ok": true,
            "error_ulp": 0
          }
        }
      },
      {
        "id": "g-solve-o",
        "reference": {
          "solve_for": "o",
          "value": 98,
          "observed": null,
          "true": 100,
          "percent_error": 2,
          "status": "success",
          "solution_type": "two",
          "absolute": true,
          "candidates": [
            98,
            102
          ]
        },
        "actual": {
          "solve_for": "o",
          "value": 98,
          "candidates": [
            98,
            102
          ],
          "observed": null,
          "true": 100,
          "percent_error": 2,
          "absolute_error": 2,
          "relative_error": 0.02,
          "signed_percent_error": -2,
          "absolute": true,
          "direction": null,
          "status": "success",
          "solution_type": "two",
          "rounding": {
            "mode": "auto",
            "significant_digits": 10,
            "trailing_zeros": "stripped"
          },
          "display": {
            "percent_error": "2%",
            "value": "98 or 102"
          }
        },
        "error_ulp": 0,
        "threshold_ulp": 2,
        "fields": {
          "status": {
            "ok": true
          },
          "solution_type": {
            "ok": true
          },
          "candidates": {
            "ok": true,
            "error_ulp": 0
          },
          "value": {
            "ok": true,
            "error_ulp": 0
          }
        }
      },
      {
        "id": "g-solve-t-two",
        "reference": {
          "solve_for": "t",
          "value": 96.07843137254902,
          "observed": 98,
          "true": null,
          "percent_error": 2,
          "status": "success",
          "solution_type": "two",
          "absolute": true,
          "candidates": [
            96.07843137254902,
            100
          ]
        },
        "actual": {
          "solve_for": "t",
          "value": 96.07843137254902,
          "candidates": [
            96.07843137254902,
            100
          ],
          "observed": 98,
          "true": null,
          "percent_error": 2,
          "absolute_error": 1.9215686274509807,
          "relative_error": 0.020000000000000004,
          "signed_percent_error": 2.0000000000000004,
          "absolute": true,
          "direction": null,
          "status": "success",
          "solution_type": "two",
          "rounding": {
            "mode": "auto",
            "significant_digits": 10,
            "trailing_zeros": "stripped"
          },
          "display": {
            "percent_error": "2%",
            "value": "96.07843137 or 100"
          }
        },
        "error_ulp": 0,
        "threshold_ulp": 2,
        "fields": {
          "status": {
            "ok": true
          },
          "solution_type": {
            "ok": true
          },
          "candidates": {
            "ok": true,
            "error_ulp": 0
          },
          "value": {
            "ok": true,
            "error_ulp": 0
          }
        }
      },
      {
        "id": "g-signed",
        "reference": {
          "solve_for": "p",
          "value": -22.22222222222222,
          "observed": 7,
          "true": 9,
          "percent_error": -22.22222222222222,
          "status": "success",
          "solution_type": "unique",
          "absolute": false
        },
        "actual": {
          "solve_for": "p",
          "value": -22.22222222222222,
          "observed": 7,
          "true": 9,
          "percent_error": -22.22222222222222,
          "absolute_error": 2,
          "relative_error": 0.2222222222222222,
          "signed_percent_error": -22.22222222222222,
          "absolute": false,
          "direction": "observed_below",
          "status": "success",
          "solution_type": "unique",
          "rounding": {
            "mode": "auto",
            "significant_digits": 10,
            "trailing_zeros": "stripped"
          },
          "display": {
            "percent_error": "-22.2222%",
            "value": "-22.22222222"
          }
        },
        "error_ulp": 0,
        "threshold_ulp": 2,
        "fields": {
          "status": {
            "ok": true
          },
          "solution_type": {
            "ok": true
          },
          "value": {
            "ok": true,
            "error_ulp": 0
          }
        }
      },
      {
        "id": "g-infinite-t",
        "reference": {
          "solve_for": "t",
          "value": null,
          "observed": 0,
          "true": null,
          "percent_error": 100,
          "status": "infinite",
          "solution_type": "infinite",
          "absolute": true,
          "code": "INFINITELY_MANY",
          "constraint": "T != 0"
        },
        "actual": {
          "solve_for": "t",
          "value": null,
          "observed": 0,
          "true": null,
          "percent_error": 100,
          "absolute_error": null,
          "relative_error": 1,
          "signed_percent_error": null,
          "absolute": true,
          "direction": null,
          "status": "infinite",
          "code": "INFINITELY_MANY",
          "solution_type": "infinite",
          "constraint": "T != 0",
          "rounding": {
            "mode": "auto",
            "significant_digits": 10,
            "trailing_zeros": "stripped"
          },
          "display": {
            "percent_error": "100%",
            "value": "any T ≠ 0"
          },
          "message": "Any nonzero accepted/reference value T satisfies |0 − T| / |T| × 100% = 100%."
        },
        "error_ulp": 0,
        "threshold_ulp": 2,
        "fields": {
          "status": {
            "ok": true
          },
          "code": {
            "ok": true
          },
          "solution_type": {
            "ok": true
          },
          "constraint": {
            "ok": true
          }
        }
      },
      {
        "id": "g-p100-t",
        "reference": {
          "solve_for": "t",
          "value": 25,
          "observed": 50,
          "true": 25,
          "percent_error": 100,
          "status": "success",
          "solution_type": "unique",
          "absolute": true,
          "omitted_branches": [
            {
              "branch": "T = O / (1 − P/100)",
              "code": "DENOMINATOR_ZERO"
            }
          ]
        },
        "actual": {
          "solve_for": "t",
          "value": 25,
          "observed": 50,
          "true": 25,
          "percent_error": 100,
          "absolute_error": 25,
          "relative_error": 1,
          "signed_percent_error": 100,
          "absolute": true,
          "direction": "observed_above",
          "status": "success",
          "solution_type": "unique",
          "omitted_branches": [
            {
              "branch": "T = O / (1 − P/100)",
              "code": "DENOMINATOR_ZERO"
            }
          ],
          "rounding": {
            "mode": "auto",
            "significant_digits": 10,
            "trailing_zeros": "stripped"
          },
          "display": {
            "percent_error": "100%",
            "value": "25"
          }
        },
        "error_ulp": 0,
        "threshold_ulp": 2,
        "fields": {
          "status": {
            "ok": true
          },
          "solution_type": {
            "ok": true
          },
          "value": {
            "ok": true,
            "error_ulp": 0
          },
          "omitted_branches": {
            "ok": true
          }
        }
      }
    ]
  },
  "interfaces": {
    "compared": [
      "ui-ssr",
      "rest",
      "mcp"
    ],
    "result": "PASS",
    "notes": "UI (SSR) · REST · MCP equivalent (MCP uses calc API handler). ui-ssr is query-result HTML, not a live browser session."
  },
  "artifacts": {
    "evidence_bundle_sha256": "e1450e25622865e874b523081f611e3e19351e166aaeea4c23ea7fcc3191d74f",
    "evidence_digest": "620c0f56d5672fdfe4e57fb0bcb51ff49c63c0a4ab90f4ae1d962f2774218d37",
    "production_sha256": "9424f31d3ca937ec4a453e41479201945df6495214f0a220ebb742e7fd1c3f20",
    "attested_catalog_sha256": "e03ef81b30568018b171fd1fc4757c2abe9df7220d9ff35bbaf08038d7630cdb",
    "production_checks": [
      {
        "id": "math.percent_error:output-const",
        "status": "pass",
        "detail": "output const 1.1.4 vs capability 1.1.4",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      },
      {
        "id": "math.percent_error:evidence-sha256",
        "status": "pass",
        "detail": "c6f3396894a1",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      },
      {
        "id": "math.percent_error:semantic-contract",
        "status": "pass",
        "detail": "14/14",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      },
      {
        "id": "math.percent_error:capability-html-public-origin-agree",
        "status": "pass",
        "detail": "public 1.1.4 vs origin 1.1.4",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      },
      {
        "id": "math.percent_error:cvp-manifest-public-origin-agree",
        "status": "pass",
        "detail": "math.percent_error/1.1.4/-/engineering/620c0f56d567",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z",
        "projection_compared": false,
        "observed_live_projection_at_attestation": "VERIFIED"
      },
      {
        "id": "math.percent_error:cvp-reproduce-manifest-agree",
        "status": "pass",
        "detail": "O3 reproduce not applicable",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      },
      {
        "id": "math.percent_error:calculator-html-cvp-projection",
        "status": "pass",
        "detail": "matches Manifest",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      },
      {
        "id": "math.percent_error:evidence-html-cvp-projection",
        "status": "pass",
        "detail": "matches Manifest",
        "scope": "last_attestation_snapshot",
        "current": true,
        "attestation_binding_current": true,
        "attested_at": "2026-09-10T02:52:51.379Z"
      }
    ]
  },
  "dependencies": [
    {
      "name": "percent-error-engine",
      "version": "1.1.4"
    },
    {
      "name": "percent-error-reference-oracle",
      "version": "1.0.0"
    },
    {
      "name": "node",
      "version": "20.19.2"
    }
  ],
  "attestation": {
    "status": "CURRENT",
    "href": "/.well-known/calculatorx-production-attestation.json",
    "id": "00c818a77ba026c2d6aa3f7402680cd2dac2a40a816209600bc3c3fcd0b8921c",
    "attested_at": "2026-09-10T02:52:51.379Z"
  },
  "domain_review": {
    "status": "ABSENT",
    "spec_version": "1.1.4"
  },
  "timestamps": {
    "verified_at": "2026-09-10T03:41:49.486Z",
    "generated_at": "2026-09-10T03:41:49.486Z"
  },
  "links": {
    "legacy_evidence": "https://www.calculatorx.com/evidence/math.percent_error/1.1.4.json",
    "evidence_page": "https://www.calculatorx.com/evidence/math.percent_error/1.1.4",
    "calculator": "https://www.calculatorx.com/calc/math/percent-error",
    "schema": "https://www.calculatorx.com/developers/cvp/schema/cvp-evidence-1.0.json",
    "protocol": "https://www.calculatorx.com/developers/cvp/spec/1.0",
    "manifest": "https://www.calculatorx.com/evidence/math.percent_error/1.1.4.cvp.json",
    "reproduce": "https://www.calculatorx.com/evidence/math.percent_error/reproduce",
    "o2_oracle": "https://www.calculatorx.com/developers/cvp/reproduce/percent-error-reference.mjs",
    "o2_checker": "https://www.calculatorx.com/developers/cvp/reproduce/check-percent-error-o2.mjs"
  }
}
