{
  "address": "165db6ddd132e3b54d8abaf7aba9068e",
  "category": "other",
  "question": "What is 1994 written as a Roman numeral?",
  "answer": "MCMXCIV",
  "askedBy": {
    "kind": "guest",
    "display": "method deck",
    "stamped": false,
    "id": null
  },
  "answeredBy": "method",
  "madeAt": "2026-09-30T22:39:30.722Z",
  "validUntil": null,
  "validityClass": "forever",
  "sources": [
    {
      "label": "A History of Mathematical Notations (Roman numeral subtractive notation)",
      "url": null
    }
  ],
  "supersedes": null,
  "supersededBy": null,
  "isSeed": false,
  "seedSource": null,
  "seedAttribution": null,
  "duplicateOfQid": null,
  "publishedAt": null,
  "unpublishedAt": null,
  "voteCount": 0,
  "queuedForSubstrate": false,
  "answerMethod": "method",
  "unsourced": false,
  "source": {
    "kind": "edition_page",
    "value": "Cajori, Florian. A History of Mathematical Notations. Open Court, 1928.",
    "retrieved_utc": "2026-09-30T19:59:00Z"
  },
  "qsha256": "e869932bb41569de435d3d16f01e37edcf772d852c9b857090070300c88d495e",
  "runOne": null,
  "cardContractVersion": "card_contract/1",
  "deck_id": "method-deck",
  "deck_title": "Method Deck",
  "method": {
    "name": "Roman numeral conversion",
    "version": "1",
    "source_url_or_file": "methods/roman-numerals-convert.cjs",
    "sha256_of_method_file": "ce36be9021be42ad875868b8a21690a159ffdddbdd7548d2e4f936cdcea739aa"
  },
  "receipt": {
    "inSubstrate": false,
    "local": true,
    "modelCallsAtMint": 0,
    "tokensAtMint": 0
  },
  "method_deck": {
    "inputs": [
      {
        "name": "direction",
        "type": "string",
        "required": true,
        "description": "Which way to convert.",
        "enum": [
          "to_roman",
          "to_arabic"
        ]
      },
      {
        "name": "value",
        "type": "string",
        "required": true,
        "description": "For to_roman: an integer 1-3999 as a string. For to_arabic: a Roman numeral string."
      }
    ],
    "outputs": [
      {
        "name": "result",
        "description": "The converted value: a Roman numeral string, or an Arabic integer."
      }
    ],
    "steps": [
      "Standard subtractive notation: symbols I=1, V=5, X=10, L=50, C=100, D=500, M=1000; a smaller symbol placed immediately before a larger one is subtracted (IV=4, IX=9, XL=40, XC=90, CD=400, CM=900); otherwise symbols are added left to right.",
      "To convert to Roman: repeatedly take the largest value-symbol pair (from 1000 down to 1, including the six subtractive pairs CM, CD, XC, XL, IX, IV) that fits into the remaining number, appending its symbol and subtracting its value, until the remaining number is 0.",
      "To convert to Arabic: scan the numeral left to right, adding each symbol's value, except when a symbol's value is less than the value of the symbol immediately following it, in which case it is subtracted instead.",
      "Valid range for to_roman is 1 to 3999 (the standard scheme has no symbol for zero or for 4000 and above without overline notation)."
    ],
    "constants": [],
    "examples": [
      {
        "name": "worked example",
        "inputs": {
          "direction": "to_roman",
          "value": "1994"
        },
        "expected": {
          "answer": "MCMXCIV"
        },
        "check": "1994 = 1000(M) + 900(CM) + 90(XC) + 4(IV) = MCMXCIV, the well known textbook example commonly used to illustrate subtractive notation."
      },
      {
        "name": "test vector: to Arabic",
        "inputs": {
          "direction": "to_arabic",
          "value": "MMXXVI"
        },
        "expected": {
          "answer": "2026"
        },
        "check": "MMXXVI = M(1000)+M(1000)+X(10)+X(10)+V(5)+I(1) = 2000+20+5+1 = 2026, verified by direct summation since no symbol here precedes a larger one."
      }
    ],
    "disclaimer": null,
    "deck_category": "other"
  },
  "status": "minted",
  "kind": "method",
  "provenanceClass": "own_question",
  "provenance": {
    "schema": "card_provenance/2.0.0",
    "chain": [
      {
        "source": {
          "kind": "edition_page",
          "value": "Cajori, Florian. A History of Mathematical Notations. Open Court, 1928.",
          "retrieved_utc": "2026-09-30T19:59:00Z"
        },
        "sha256": "1ea505238dd6d7184d5b922eff60281df510af03ccc3eaf66fb53bab742c673e",
        "supersedes": null,
        "added_utc": "2026-09-30T22:39:30.722Z",
        "added_by": "method:Roman numeral conversion",
        "why": "the method that computed this answer",
        "check": null,
        "status_label": "pending",
        "signature": null
      }
    ]
  }
}
