hypot(3f) - [FORTRAN:INTRINSIC:MATHEMATICS] Euclidean distance function
result = hypot(x, y)
hypot(x,y) is the Euclidean distance function. It is equal to
sqrt{X**2 + Y**2}, without undue underflow or overflow.
X The type shall be REAL. Y The type and kind type parameter shall be the same as X.
The return value has the same type and kind type parameter as X.
Sample program:
program demo_hypot implicit none real(4) :: x = 1.e0_4, y = 0.5e0_4 x = hypot(x,y) end program demo_hypot
[[Fortran 2008]] and later
[[Elemental procedure|Elemental function]]
hypot (3) | March 11, 2021 |