62 DOUBLE PRECISION FUNCTION dlapy2( X, Y )
76 parameter( zero = 0.0d0 )
78 parameter( one = 1.0d0 )
81 DOUBLE PRECISION w, xabs, yabs, z, hugeval
82 LOGICAL x_is_nan, y_is_nan
92 INTRINSIC abs, max, min, sqrt
100 hugeval =
dlamch(
'Overflow' )
102 IF ( .NOT.( x_is_nan.OR.y_is_nan ) )
THEN
105 w = max( xabs, yabs )
106 z = min( xabs, yabs )
107 IF( z.EQ.zero .OR. w.GT.hugeval )
THEN
110 dlapy2 = w*sqrt( one+( z / w )**2 )
logical function disnan(din)
DISNAN tests input for NaN.
double precision function dlamch(cmach)
DLAMCH
double precision function dlapy2(x, y)
DLAPY2 returns sqrt(x2+y2).