{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/math.multiplication.input.json",
  "title": "Multiplication — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "a": {
      "anyOf": [
        {
          "type": "number",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)\\s*$"
        }
      ]
    },
    "b": {
      "anyOf": [
        {
          "type": "number",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)\\s*$"
        }
      ]
    },
    "aInput": {
      "anyOf": [
        {
          "type": "number",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)\\s*$"
        }
      ]
    },
    "bInput": {
      "anyOf": [
        {
          "type": "number",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)\\s*$"
        }
      ]
    },
    "mode": {
      "enum": [
        "product",
        "long"
      ]
    }
  },
  "allOf": [
    {
      "anyOf": [
        {
          "required": [
            "a"
          ]
        },
        {
          "required": [
            "aInput"
          ]
        }
      ]
    },
    {
      "anyOf": [
        {
          "required": [
            "b"
          ]
        },
        {
          "required": [
            "bInput"
          ]
        }
      ]
    }
  ],
  "description": "Plain exact decimals:512 characters and48 significant digits including trailing zeros; matching a/aInput and b/bInput aliases. Mode defaults only when absent. Secondary engine validation enforces digit bounds, equality of aliases and rejects unsafe integer numbers. productStr exact; product approximate/null on range loss. (calculation_version 1.0.4)"
}
