HYPOT(X, Y) (Fortran 2008)

Purpose

Calculates the Euclidean distance between two values.

Class

Elemental function

Argument type and attributes

X
Must be of type real.
Y
Must be of the same type and kind type parameter as X.

Result type and attributes

Same as X.

Result value

The result value is equal to sqrt(x2 + y2), approximately.

Example

HYPOT(3.0, 4.0) has the value 5.0.