110552Sdlw /* 2*22999Skre * Copyright (c) 1980 Regents of the University of California. 3*22999Skre * All rights reserved. The Berkeley software License Agreement 4*22999Skre * specifies the terms and conditions for redistribution. 5*22999Skre * 6*22999Skre * @(#)z_log.c 5.1 06/07/85 710552Sdlw */ 810552Sdlw 910552Sdlw #include "complex" 1010552Sdlw 1110552Sdlw z_log(r, z) 1210552Sdlw dcomplex *r, *z; 1310552Sdlw { 1410552Sdlw double log(), cabs(), atan2(); 1510552Sdlw 1610552Sdlw r->dimag = atan2(z->dimag, z->dreal); 1710552Sdlw r->dreal = log( cabs( z->dreal, z->dimag ) ); 1810552Sdlw } 19