{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/math.polynomial.roots/1.2.2/input.json",
  "title": "Polynomial roots — input",
  "type": "object",
  "properties": {
    "coeffs": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 4608
        },
        {
          "type": "array",
          "minItems": 2,
          "maxItems": 9,
          "items": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "maxLength": 512,
                "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
              }
            ]
          }
        }
      ]
    },
    "coefficients": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 4608
        },
        {
          "type": "array",
          "minItems": 2,
          "maxItems": 9,
          "items": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "maxLength": 512,
                "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
              }
            ]
          }
        }
      ]
    },
    "a": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ]
    },
    "b": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ]
    },
    "c": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ]
    },
    "d": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ]
    },
    "x": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ]
    },
    "method": {
      "type": "string",
      "description": "all_roots/all/roots/durand_kerner/durand/weierstrass/dk;cardano/cubic/cubic_equation/cubic_formula;evaluate/eval/horner/polynomial_evaluate/polynomial_evaluation. Case/space/hyphen normalization."
    },
    "mode": {
      "type": "string",
      "description": "all_roots/all/roots/durand_kerner/durand/weierstrass/dk;cardano/cubic/cubic_equation/cubic_formula;evaluate/eval/horner/polynomial_evaluate/polynomial_evaluation. Case/space/hyphen normalization."
    }
  },
  "anyOf": [
    {
      "required": [
        "coeffs"
      ]
    },
    {
      "required": [
        "coefficients"
      ]
    },
    {
      "required": [
        "a"
      ]
    }
  ],
  "additionalProperties": false,
  "description": "All roots of a real polynomial of degree 1–8, or Horner evaluation at a real x. Closed form for linear, quadratic, and cubic (Cardano); Durand–Kerner otherwise. Cubic discovery /cubic-equation. Evaluate discovery /polynomial-evaluate. Not the quadratic formula page, not Ferrari, not a single Newton root, not CAS. (calculation_version 1.2.2)"
}
