# Hypot

Computes a square root of sum of two squared elements.

## Syntax

Fortran:

call vshypot( n, a, b, y )

call vdhypot( n, a, b, y )

C:

vsHypot( n, a, b, y );

vdHypot( n, a, b, y );

## Input Parameters

Name | Type | Description
--- | --- | ---
n | FORTRAN: INTEGER, INTENT(IN) C: int | Number of elements to be calculated.
a,b | FORTRAN: REAL, INTENT(IN) for vshypot DOUBLE PRECISION, INTENT(IN) for vdhypot C: const float* for vsHypot const double* for vdHypot | FORTRAN: Arrays that specify the input vectors a and b C: Pointers to arrays that contain the input vectors a and b.

Precision Overflow Thresholds for Hypot Function
Data Type | Threshold Limitations on Input Parameters
--- | ---
single precision | `abs(a[i]) < sqrt(FLT_MAX)` `abs(b[i]) < sqrt(FLT_MAX)`
double precision | `abs(a[i]) < sqrt(DBL_MAX)` `abs(b[i]) < sqrt(DBL_MAX)`

## Output Parameters

Name | Type | Description
--- | --- | ---
y | FORTRAN: REAL for vshypot DOUBLE PRECISION for vdhypot C: float* for vsHypot double* for vdHypot | FORTRAN: Array, specifies the output vector y. C: Pointer to an array that contains the output vector y.

Parent topic: Power and Root Functions