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

815 B

title description menu weight
math.hypot() function The math.hypot() function returns the square root of `p*p + q*q`, taking care to avoid unnecessary overflow and underflow.
v2_0_ref
name parent
math.hypot Math
301

The math.hypot() function returns the square root of p*p + q*q, taking care to avoid overflow and underflow.

Output data type: Float

import "math"

math.hypot(p: 2.0, q: 5.0)

// Returns 5.385164807134505

Parameters

p

The p value used in the operation.

Data type: Float

q

The q value used in the operation.

Data type: Float

Special cases

math.hypot(p: ±Inf, q:q) // Returns +Inf
math.hypot(p:p, q: ±Inf) // Returns +Inf
math.hypot(p: NaN, q:q)  // Returns NaN
math.hypot(p:p, q: NaN)  // Returns NaN