{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/math.square_root.input.json",
  "title": "Square root — input",
  "type": "object",
  "properties": {
    "x": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite binary64 number or strict decimal/scientific text ≤512 characters; nonzero-to-zero conversion rejects NUMERIC_UNDERFLOW. Matching aliases only."
    },
    "xInput": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite binary64 number or strict decimal/scientific text ≤512 characters; nonzero-to-zero conversion rejects NUMERIC_UNDERFLOW. Matching aliases only."
    }
  },
  "anyOf": [
    {
      "required": [
        "x"
      ]
    },
    {
      "required": [
        "xInput"
      ]
    }
  ],
  "additionalProperties": false,
  "description": "Principal square root of x; non-negative returns real principal, negative returns principal imaginary √|x| i. (calculation_version 1.0.4)"
}
