{
"id": "fn-math-max",
"dataComponent": "math",
"heading": {
"title": "max",
"badges": ["Math", "JSMath", "PARTIAL"]
},
"synopsis": "Returns the largest of a set of numeric arguments (variadic). Partial usage allows you to accumulate arguments in steps until you call it.",
"codeBlocks": [
"extend(\"math\")\\n\\n# Direct usage\\nsput( math:max(3, 1, 9, 2) )\\n# => 9\\n\\n# Variadic => can pass as many as you like\\nsput( math:max(10, 50, 40, 999, 1002) )\\n# => 1002\\n\\n# Partial usage => supply some args first\\nhalfMax = math:max(100, 250)\\n# => function waiting for more numbers\\nsput( halfMax(60, 999, 1) )\\n# => 999"
],
"notes": [
"If no arguments are eventually provided, result may be -Infinity or an error, depending on bridging.",
"If any argument is non-numeric, an error may occur or result is NaN. Implementation detail depends on bridging."
]
}