1: /*
   2:  *	"@(#)pow_zz.c	1.1"
   3:  */
   4: 
   5: #include "complex"
   6: 
   7: pow_zz(r,a,b)
   8: dcomplex *r, *a, *b;
   9: {
  10: double logr, logi, x, y;
  11: double log(), exp(), cos(), sin(), atan2(), cabs();
  12: 
  13: logr = log( cabs(a->dreal, a->dimag) );
  14: logi = atan2(a->dimag, a->dreal);
  15: 
  16: x = exp( logr * b->dreal - logi * b->dimag );
  17: y = logr * b->dimag + logi * b->dreal;
  18: 
  19: r->dreal = x * cos(y);
  20: r->dimag = x * sin(y);
  21: }

Defined functions

pow_zz defined in line 7; never used
Last modified: 1983-05-20
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 611
Valid CSS Valid XHTML 1.0 Strict