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

Function pow_di

numpy/linalg/lapack_lite/f2c.c:258–287  ·  view source on GitHub ↗
(ap, bp)

Source from the content-addressed store, hash-verified

256
257#ifdef KR_headers
258double pow_di(ap, bp) doublereal *ap; integer *bp;
259#else
260double pow_di(doublereal *ap, integer *bp)
261#endif
262{
263double pow, x;
264integer n;
265unsigned long u;
266
267pow = 1;
268x = *ap;
269n = *bp;
270
271if(n != 0)
272 {
273 if(n < 0)
274 {
275 n = -n;
276 x = 1/x;
277 }
278 for(u = n; ; )
279 {
280 if(u & 01)
281 pow *= x;
282 if(u >>= 1)
283 x *= x;
284 else
285 break;
286 }
287 }
288return(pow);
289}
290

Callers 5

dlaed6_Function · 0.85
dlartg_Function · 0.85
dlamch_Function · 0.85
dlamc2_Function · 0.85
zlartg_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected