Manual Reference Pages - hypot (3)
NAME
hypot(3f) - [M_math:geometry] Euclidean distance function
CONTENTS
Synopsis
Description
Options
Result
Standard
Example
SYNOPSIS
pure function hypot(x,y) result(z)
real,intent(in):: x,y
real:: z
DESCRIPTION
hypot(x,y) is the Euclidean distance function. It is equal to
sqrt{X**2 + Y**2}, without undue underflow or overflow.
That is, solve for SQRT(x*x+y*y) carefully to avoid overflow
(will be an intrinsic in Fortran 2008).
OPTIONS
X |
The type shall be REAL.
|
Y |
The type and kind type parameter shall be the same as X.
|
|
RESULT
HYPOT |
The return value has the same type and kind type parameter as X.
|
|
STANDARD
[[Fortran 2008]] and later
EXAMPLE
Sample program:
program demo_hypot
real(4) :: x = 1.e0_4, y = 0.5e0_4
x = hypot(x,y)
end program demo_hypot
| hypot (3) | October 17, 2020 |
Generated by manServer 1.08 from 48e53759-775a-480e-ab41-df0a6b82571b using man macros.