* fix to ucomplex.cln from Dimitris Apostolou

git-svn-id: trunk@4299 -
This commit is contained in:
florian 2006-07-28 21:06:33 +00:00
parent 65503f5786
commit 88cb816ebd

View File

@ -408,12 +408,9 @@ Unit UComplex;
function cln (z : complex) : complex;
{ natural logarithm : r := ln(z) }
{ ln( p exp(i0)) = ln(p) + i0 + 2kpi }
var modz : real;
begin
with z do
modz := (re * re) + (im * im);
cln.re := ln(modz);
cln.im := arctan2(z.re, z.im);
cln.re := ln(cmod(z));
cln.im := arctan2(z.im, z.re);
end;
function csqrt (z : complex) : complex;