1*47940Sbostic /*- 2*47940Sbostic * Copyright (c) 1980 The Regents of the University of California. 3*47940Sbostic * All rights reserved. 422999Skre * 5*47940Sbostic * %sccs.include.proprietary.c% 610552Sdlw */ 710552Sdlw 8*47940Sbostic #ifndef lint 9*47940Sbostic static char sccsid[] = "@(#)z_log.c 5.3 (Berkeley) 04/12/91"; 10*47940Sbostic #endif /* not lint */ 11*47940Sbostic 1210552Sdlw #include "complex" 1329972Smckusick #ifdef tahoe 1429972Smckusick #define cabs zabs 1529972Smckusick #endif tahoe 1610552Sdlw z_log(r,z)1710552Sdlwz_log(r, z) 1810552Sdlw dcomplex *r, *z; 1910552Sdlw { 2010552Sdlw double log(), cabs(), atan2(); 2110552Sdlw 2210552Sdlw r->dimag = atan2(z->dimag, z->dreal); 2310552Sdlw r->dreal = log( cabs( z->dreal, z->dimag ) ); 2410552Sdlw } 25