#
Fortran Wiki

hypot

## Description

`hypot(x,y)`

is the Euclidean distance function. It is equal to $\sqrt{X^2 + Y^2}$, without undue underflow or overflow.

## Standard

Fortran 2008 and later

## Class

Elemental function

## Syntax

`result = hypot(x, y)`

## Arguments

`x`

- The type shall be `real`

.
`y`

- The type and kind type parameter shall be the same as `x`

.

## Return value

The return value has the same type and kind type parameter as `x`

.

## Example

```
program test_hypot
real(4) :: x = 1.e0_4, y = 0.5e0_4
x = hypot(x,y)
end program test_hypot
```

Revised on April 30, 2009 22:48:08
by

Jason Blevins
(71.70.142.190)
(638 characters / 0.0 pages)