MCPcopy Create free account
hub / github.com/numpy/numpy / dlapy2_

Function dlapy2_

numpy/linalg/lapack_lite/f2c_d_lapack.c:17229–17277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17227} /* dlanv2_ */
17228
17229doublereal dlapy2_(doublereal *x, doublereal *y)
17230{
17231 /* System generated locals */
17232 doublereal ret_val, d__1;
17233
17234 /* Local variables */
17235 static doublereal w, z__, xabs, yabs;
17236
17237
17238/*
17239 -- LAPACK auxiliary routine (version 3.2) --
17240 -- LAPACK is a software package provided by Univ. of Tennessee, --
17241 -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
17242 November 2006
17243
17244
17245 Purpose
17246 =======
17247
17248 DLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary
17249 overflow.
17250
17251 Arguments
17252 =========
17253
17254 X (input) DOUBLE PRECISION
17255 Y (input) DOUBLE PRECISION
17256 X and Y specify the values x and y.
17257
17258 =====================================================================
17259*/
17260
17261
17262 xabs = abs(*x);
17263 yabs = abs(*y);
17264 w = max(xabs,yabs);
17265 z__ = min(xabs,yabs);
17266 if (z__ == 0.) {
17267 ret_val = w;
17268 } else {
17269/* Computing 2nd power */
17270 d__1 = z__ / w;
17271 ret_val = w * sqrt(d__1 * d__1 + 1.);
17272 }
17273 return ret_val;
17274
17275/* End of DLAPY2 */
17276
17277} /* dlapy2_ */
17278
17279doublereal dlapy3_(doublereal *x, doublereal *y, doublereal *z__)
17280{

Callers 12

dgeev_Function · 0.85
dlaed2_Function · 0.85
dlaed8_Function · 0.85
dlanv2_Function · 0.85
dlarfg_Function · 0.85
dlasd2_Function · 0.85
dlasd7_Function · 0.85
dsteqr_Function · 0.85
dsterf_Function · 0.85
zlaed8_Function · 0.85
zlartg_Function · 0.85
zsteqr_Function · 0.85

Calls 4

absFunction · 0.85
maxFunction · 0.50
minFunction · 0.50
sqrtFunction · 0.50

Tested by

no test coverage detected