3 * =========== DOCUMENTATION
===========
5 * Online html documentation available at
6 * http
://www
.netlib
.org
/lapack
/explore
-html
/
9 *> Download SLAPY3
+ dependencies
10 *> <a href
="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slapy3.f">
12 *> <a href
="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slapy3.f">
14 *> <a href
="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slapy3.f">
21 * REAL FUNCTION SLAPY3
( X
, Y
, Z
)
23 * .. Scalar Arguments
..
33 *> SLAPY3 returns sqrt
(x**2
+y**2
+z**2
), taking care not
to cause
34 *> unnecessary overflow
.
53 *> X
, Y and Z specify the values x
, y and z
.
59 *> \author Univ
. of Tennessee
60 *> \author Univ
. of California Berkeley
61 *> \author Univ
. of Colorado Denver
64 *> \
date November
2011
66 *> \ingroup auxOTHERauxiliary
68 * =====================================================================
69 REAL FUNCTION SLAPY3
( X
, Y
, Z
)
71 * -- LAPACK auxiliary routine
(version
3.4.0) --
72 * -- LAPACK is a software package provided by Univ
. of Tennessee
, --
73 * -- Univ
. of California Berkeley
, Univ
. of Colorado Denver and NAG Ltd
..--
76 * .. Scalar Arguments
..
80 * =====================================================================
84 PARAMETER ( ZERO
= 0.0E0
)
87 REAL W
, XABS
, YABS
, ZABS
89 * .. Intrinsic Functions
..
90 INTRINSIC ABS
, MAX
, SQRT
92 * .. Executable Statements
..
97 W
= MAX
( XABS
, YABS
, ZABS
)
99 * W can be zero
for max
(0,nan
,0)
100 * adding all three entries together will make sure
101 * NaN will not disappear
.
102 SLAPY3
= XABS
+ YABS
+ ZABS
104 SLAPY3
= W*SQRT
( ( XABS
/ W
)**2+( YABS
/ W
)**2+