repl.txt (1070B)
1 2 {{alias}}( [x[, y[, ...args]]] ) 3 Returns the maximum value. 4 5 If any argument is `NaN`, the function returns `NaN`. 6 7 When an empty set is considered a subset of the extended reals (all real 8 numbers, including positive and negative infinity), negative infinity is the 9 least upper bound. Similar to zero being the identity element for the sum of 10 an empty set and to one being the identity element for the product of an 11 empty set, negative infinity is the identity element for the maximum, and 12 thus, if not provided any arguments, the function returns negative infinity. 13 14 Parameters 15 ---------- 16 x: number (optional) 17 First number. 18 19 y: number (optional) 20 Second number. 21 22 args: ...number (optional) 23 Numbers. 24 25 Returns 26 ------- 27 out: number 28 Maximum value. 29 30 Examples 31 -------- 32 > var v = {{alias}}( 3.14, 4.2 ) 33 4.2 34 > v = {{alias}}( 5.9, 3.14, 4.2 ) 35 5.9 36 > v = {{alias}}( 3.14, NaN ) 37 NaN 38 > v = {{alias}}( +0.0, -0.0 ) 39 +0.0 40 41 See Also 42 -------- 43