Click or drag to resize

BasicFunctionsLogRel(Complex, Boolean) Method

LogRel(z) = log(1+z) with relative error accuracy near z = 0.

Namespace: Altaxo.Calc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static Complex LogRel(
	Complex z,
	bool bDebug
)

Parameters

z  Complex
The complex argument z.
bDebug  Boolean
If true, an exception will be thrown if errors occur, if false, double.NaN is returned in this case.

Return Value

Complex
Log(1+z) with relative error accuracy near z=0.
Remarks
C#
April 1977 version.  W. Fullerton, c3, Los Alamos Scientific Lab.

let   rho = abs(z)  and
      r**2 = abs(1+z)**2 = (1+x)**2 + y**2 = 1 + 2*x + rho**2 .
now if rho is small we may evaluate LogRel(z) accurately by
      log(1+z) = complex (log(r), arg(1+z))
               = complex (0.5*log(r**2), arg(1+z))
               = complex (0.5*LogRel(2*x+rho**2), arg(1+z))
See Also