1 /*- 2 * Copyright (c) 1980 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)z_log.c 5.3 (Berkeley) 04/12/91"; 10 #endif /* not lint */ 11 12 #include "complex" 13 #ifdef tahoe 14 #define cabs zabs 15 #endif tahoe 16 17 z_log(r, z) 18 dcomplex *r, *z; 19 { 20 double log(), cabs(), atan2(); 21 22 r->dimag = atan2(z->dimag, z->dreal); 23 r->dreal = log( cabs( z->dreal, z->dimag ) ); 24 } 25