Data connectivity & integrationPipeline Builder ExpressionsHypotenuse

Hypotenuse

Supported in: Batch, Faster, Streaming

Returns sqrt(x² + y²) without intermediate overflow or underflow. Returns infinity if either number is infinite, even if the other is not a number.

Expression categories: Numeric

Declared arguments

  • X: First side of the right triangle.
    Expression<Numeric>
  • Y: Second side of the right triangle.
    Expression<Numeric>

Output type: Double

Examples

Example 1: Base case

Argument values:

  • X: x
  • Y: y
xyOutput
3.04.05.0
-5.012.013.0
1.01.01.4142135623730951

Example 2: Null case

Description: Returns null if either number is null.

Argument values:

  • X: x
  • Y: y
xyOutput
null1.0null
1.0nullnull
nullInfinitynull