LAPACK  3.10.0 LAPACK: Linear Algebra PACKage

## ◆ dlapy3()

 double precision function dlapy3 ( double precision X, double precision Y, double precision Z )

DLAPY3 returns sqrt(x2+y2+z2).

Purpose:
``` DLAPY3 returns sqrt(x**2+y**2+z**2), taking care not to cause
unnecessary overflow and unnecessary underflow.```
Parameters
 [in] X ` X is DOUBLE PRECISION` [in] Y ` Y is DOUBLE PRECISION` [in] Z ``` Z is DOUBLE PRECISION X, Y and Z specify the values x, y and z.```

Definition at line 67 of file dlapy3.f.

68 *
69 * -- LAPACK auxiliary routine --
70 * -- LAPACK is a software package provided by Univ. of Tennessee, --
71 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
72 *
73 * .. Scalar Arguments ..
74  DOUBLE PRECISION X, Y, Z
75 * ..
76 *
77 * =====================================================================
78 *
79 * .. Parameters ..
80  DOUBLE PRECISION ZERO
81  parameter( zero = 0.0d0 )
82 * ..
83 * .. Local Scalars ..
84  DOUBLE PRECISION W, XABS, YABS, ZABS
85 * ..
86 * .. Intrinsic Functions ..
87  INTRINSIC abs, max, sqrt
88 * ..
89 * .. Executable Statements ..
90 *
91  xabs = abs( x )
92  yabs = abs( y )
93  zabs = abs( z )
94  w = max( xabs, yabs, zabs )
95  IF( w.EQ.zero ) THEN
96 * W can be zero for max(0,nan,0)
97 * adding all three entries together will make sure
98 * NaN will not disappear.
99  dlapy3 = xabs + yabs + zabs
100  ELSE
101  dlapy3 = w*sqrt( ( xabs / w )**2+( yabs / w )**2+
102  \$ ( zabs / w )**2 )
103  END IF
104  RETURN
105 *
106 * End of DLAPY3
107 *
double precision function dlapy3(X, Y, Z)
DLAPY3 returns sqrt(x2+y2+z2).
Definition: dlapy3.f:68