4 #include "base/cl_sysdep.h"
7 #include "cln/complex.h"
12 #include "complex/cl_C.h"
14 #include "base/cl_N.h"
18 const cl_N log (const cl_N& x)
21 // (complex (log (abs x)) (phase x))
23 if (zerop(r)) // (abs x) = 0 -> Error
24 { throw division_by_0_exception(); }
25 return complex(ln(r),phase(x));