v?Hypot

Computes a square root of sum of two squared elements.

Syntax

Fortran:

call vshypot( n, a, b, y )

call vmshypot( n, a, b, y, mode )

call vdhypot( n, a, b, y )

call vmdhypot( n, a, b, y, mode )

C:

vsHypot( n, a, b, y );

vmsHypot( n, a, b, y, mode );

vdHypot( n, a, b, y );

vmdHypot( n, a, b, y, mode );

Include Files

The FORTRAN 77 interfaces are specified in the mkl_vml.f77 include file, the Fortran 95 interfaces are specified in the mkl_vml.f90 include file, and the C interfaces are specified in the mkl_vml_functions.h include file.

Input Parameters

Name

Type

Description

n

FORTRAN 77: INTEGER

Fortran 90: INTEGER, INTENT(IN)

C: const int

Number of elements to be calculated.

a, b

FORTRAN 77: REAL for vshypot, vmshypot

DOUBLE PRECISION for vdhypot, vmdhypot

Fortran 90: REAL, INTENT(IN) for vshypot, vmshypot

DOUBLE PRECISION, INTENT(IN) for vdhypot, vmdhypot

C: const float* for vsHypot, vmsHypot

const double* for vdHypot, vmdHypot

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 77: REAL for vshypot, vmshypot

DOUBLE PRECISION for vdhypot, vmdhypot

Fortran 90: REAL, INTENT(OUT) for vshypot, vmshypot

DOUBLE PRECISION, INTENT(OUT) for vdhypot, vmdhypot

C: float* for vsHypot, vmsHypot

double* for vdHypot, vmdHypot

FORTRAN: Array that specifies the output vector y.

C: Pointer to an array that contains the output vector y.

Description

The function v?Hypot computes a square root of sum of two squared elements.

Special values for Real Function v?Hypot(x)
Argument 1 Argument 2 Result Exception
+0 +0 +0  
-0 -0 +0  
+ any value +  
any value + +  
SNAN any value QNAN INVALID
any value SNAN QNAN INVALID
QNAN any value QNAN  
any value QNAN QNAN  

Submit feedback on this help topic

Copyright © 1994 - 2010, Intel Corporation. All rights reserved.