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

Function slapy2_

numpy/linalg/lapack_lite/f2c_s_lapack.c:17170–17218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17168} /* slanv2_ */
17169
17170doublereal slapy2_(real *x, real *y)
17171{
17172 /* System generated locals */
17173 real ret_val, r__1;
17174
17175 /* Local variables */
17176 static real w, z__, xabs, yabs;
17177
17178
17179/*
17180 -- LAPACK auxiliary routine (version 3.2) --
17181 -- LAPACK is a software package provided by Univ. of Tennessee, --
17182 -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
17183 November 2006
17184
17185
17186 Purpose
17187 =======
17188
17189 SLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary
17190 overflow.
17191
17192 Arguments
17193 =========
17194
17195 X (input) REAL
17196 Y (input) REAL
17197 X and Y specify the values x and y.
17198
17199 =====================================================================
17200*/
17201
17202
17203 xabs = dabs(*x);
17204 yabs = dabs(*y);
17205 w = dmax(xabs,yabs);
17206 z__ = dmin(xabs,yabs);
17207 if (z__ == 0.f) {
17208 ret_val = w;
17209 } else {
17210/* Computing 2nd power */
17211 r__1 = z__ / w;
17212 ret_val = w * sqrt(r__1 * r__1 + 1.f);
17213 }
17214 return ret_val;
17215
17216/* End of SLAPY2 */
17217
17218} /* slapy2_ */
17219
17220doublereal slapy3_(real *x, real *y, real *z__)
17221{

Callers 12

claed8_Function · 0.85
clartg_Function · 0.85
csteqr_Function · 0.85
sgeev_Function · 0.85
slaed2_Function · 0.85
slaed8_Function · 0.85
slanv2_Function · 0.85
slarfg_Function · 0.85
slasd2_Function · 0.85
slasd7_Function · 0.85
ssteqr_Function · 0.85
ssterf_Function · 0.85

Calls 1

sqrtFunction · 0.50

Tested by

no test coverage detected