1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)pow_zz.c	5.1	6/7/85
   7:  */
   8: 
   9: #include "complex"
  10: 
  11: pow_zz(r,a,b)
  12: dcomplex *r, *a, *b;
  13: {
  14: double logr, logi, x, y;
  15: double log(), exp(), cos(), sin(), atan2(), cabs();
  16: 
  17: logr = log( cabs(a->dreal, a->dimag) );
  18: logi = atan2(a->dimag, a->dreal);
  19: 
  20: x = exp( logr * b->dreal - logi * b->dimag );
  21: y = logr * b->dimag + logi * b->dreal;
  22: 
  23: r->dreal = x * cos(y);
  24: r->dimag = x * sin(y);
  25: }

Defined functions

pow_zz defined in line 11; never used
Last modified: 1987-02-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2048
Valid CSS Valid XHTML 1.0 Strict