{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/math.factorial.input.json",
  "title": "Ordinary factorial — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "n": {
      "oneOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 5000
        },
        {
          "type": "string",
          "pattern": "^\\s*-?[0-9]+\\s*$",
          "maxLength": 128,
          "description": "Digits only; trimmed token at most64 characters; range and aliases checked by engine."
        }
      ]
    },
    "nInput": {
      "oneOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 5000
        },
        {
          "type": "string",
          "pattern": "^\\s*-?[0-9]+\\s*$",
          "maxLength": 128,
          "description": "Digits only; trimmed token at most64 characters; range and aliases checked by engine."
        }
      ]
    }
  },
  "anyOf": [
    {
      "required": [
        "n"
      ]
    },
    {
      "required": [
        "nInput"
      ]
    }
  ],
  "description": "Exact n! for integers 0 ≤ n ≤ 5000 via BigInt arithmetic, with product expansion, digit count, and scientific notation for long integers. Matching n/nInput aliases; unknown fields rejected. Exactness refers to normalized integer input; numeric JSON rounds to binary64. Scientific preview truncates to12 leading digits; complete decimal digits in exact. (calculation_version 1.0.4)"
}
