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

Function pow_zi

numpy/linalg/lapack_lite/f2c.c:292–315  ·  view source on GitHub ↗
(p, a, b)

Source from the content-addressed store, hash-verified

290
291#ifdef KR_headers
292VOID pow_zi(p, a, b) /* p = a**b */
293 doublecomplex *p, *a; integer *b;
294#else
295extern void z_div(doublecomplex*, doublecomplex*, doublecomplex*);
296void pow_zi(doublecomplex *p, doublecomplex *a, integer *b) /* p = a**b */
297#endif
298{
299 integer n;
300 unsigned long u;
301 double t;
302 doublecomplex q, x;
303 static doublecomplex one = {1.0, 0.0};
304
305 n = *b;
306 q.r = 1;
307 q.i = 0;
308
309 if(n == 0)
310 goto done;
311 if(n < 0)
312 {
313 n = -n;
314 z_div(&x, &one, a);
315 }
316 else
317 {
318 x.r = a->r;

Callers 1

zlahqr_Function · 0.85

Calls 1

z_divFunction · 0.85

Tested by

no test coverage detected