mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 10:29:21 +02:00
* fix to ucomplex.cln from Dimitris Apostolou
git-svn-id: trunk@4299 -
This commit is contained in:
parent
65503f5786
commit
88cb816ebd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user