{
"id": "fn-math-sqrt",
"dataComponent": "math",
"heading": {
"title": "sqrt",
"badges": ["Math"]
},
"synopsis": "Returns the square root of a single non-negative numeric argument. Raises an error if negative.",
"codeBlocks": [
"extend(\"math\")\n\n# 1) Direct usage => single argument\nsput( math:sqrt(25) )\n# => 5.0\n\nsput( math:sqrt(3.14) )\n# => ~1.77200451466\n\n# 2) Negative inputs typically raise an error or return NaN (depending on bridging):\n# math:sqrt(-1) => error or invalid.\n\n# 3) If bridging does not support partial usage for sqrt, it requires exactly one argument.\n"
],
"notes": [
"Takes exactly one numeric argument >= 0. If negative, bridging may raise an error or produce NaN (implementation-dependent).",
"Returns a float. If the input was an integer, you still get a float result (e.g., 25 => 5.0).",
"Does not support partial usage in most builds; if you pass fewer or more than one argument, it raises an error."
]
}