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 * @(#)z_log.c 5.2 11/03/86 7 */ 8 9 #include "complex" 10 #ifdef tahoe 11 #define cabs zabs 12 #endif tahoe 13 14 z_log(r, z) 15 dcomplex *r, *z; 16 { 17 double log(), cabs(), atan2(); 18 19 r->dimag = atan2(z->dimag, z->dreal); 20 r->dreal = log( cabs( z->dreal, z->dimag ) ); 21 } 22