mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 16:48:12 +02:00
* patch from Antonio Puente Rodero to fix arctanh and arccosh in unit ucomplex, resolves #18844
git-svn-id: trunk@17253 -
This commit is contained in:
parent
8bff2a0de4
commit
f2a3f4e5af
@ -344,7 +344,7 @@ Unit UComplex;
|
||||
z.re := (znum.im + znum.re * tmp) / denom;
|
||||
z.im := (-znum.re + znum.im * tmp) / denom;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
operator / (znum : complex; r : real) z : complex;
|
||||
{ division : z := znum / r }
|
||||
@ -572,7 +572,7 @@ Unit UComplex;
|
||||
{ _________ }
|
||||
{ argch(z) = -/+ ln(z + i.V 1 - z.z) }
|
||||
begin
|
||||
carg_ch:=-cln(z+i*csqrt(z*z-1.0));
|
||||
carg_ch:=-cln(z+i*csqrt(1.0-z*z));
|
||||
end;
|
||||
|
||||
function carg_sh (z : complex) : complex;
|
||||
@ -587,7 +587,7 @@ Unit UComplex;
|
||||
{ hyperbolic arc tangent }
|
||||
{ argth(z) = 1/2 ln((z + 1) / (1 - z)) }
|
||||
begin
|
||||
carg_th:=cln((z+1.0)/(z-1.0))/2.0;
|
||||
carg_th:=cln((z+1.0)/(1.0-z))/2.0;
|
||||
end;
|
||||
|
||||
{ functions to write out a complex value }
|
||||
|
Loading…
Reference in New Issue
Block a user