2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: HYPOT, Euclidean distance
10 HYPOT --- Euclidean distance function
11 *************************************
13 .. function:: HYPOT(X,Y)
15 ``HYPOT(X,Y)`` is the Euclidean distance function. It is equal to
16 \sqrt{X^2 + Y^2}, without undue underflow or overflow.
19 The type shall be ``REAL``.
22 The type and kind type parameter shall be the same as
26 The return value has the same type and kind type parameter as :samp:`{X}`.
29 Fortran 2008 and later
35 .. code-block:: fortran
40 .. code-block:: fortran
43 real(4) :: x = 1.e0_4, y = 0.5e0_4
45 end program test_hypot