docs-v2/content/v2.0/reference/flux/functions/math/m_max.md

800 B

title description menu weight
math.m_max() function The math.m_max() function returns the larger of `x` or `y`.
v2_0_ref
name parent
math.m_max Math
301

The math.m_max() function returns the larger of x or y.

Output data type: Float

import "math"

math.m_max(x: 1.23, y: 4.56)

// Returns 4.56

Parameters

x

The X value used in the operation.

Data type: Float

y

The Y value used in the operation.

Data type: Float

Special cases

math.m_max(x:x, y:+Inf)  // Returns +Inf
math.m_max(x: +Inf, y:y) // Returns +Inf
math.m_max(x:x, y: NaN)  // Returns NaN
math.m_max(x: NaN, y:y)  // Returns NaN
math.m_max(x: +0, y: ±0) // Returns +0
math.m_max(x: ±0, y: +0) // Returns +0
math.m_max(x: -0, y: -0) // Returns -0