Help Center

CComplex.CLogAbsmethod

Returns the natural logarithm of the magnitude of a complex number.

Numeric DatatypesmethodCComplex.incdocumented

Syntax

FUNCTION CLogAbs () AS DOUBLE

Description

Returns the natural logarithm of the magnitude of the complex number z, log|z|. It allows an accurate evaluation of \log|z| when |z| is close to one. The direct evaluation of log(CAbs(z)) would lead to a loss of precision in this case.

Example

DIM cpx AS CComplex = CComplex(1.1, 0.1) PRINT cpx.CLogAbs Output: 0.09942542937258279

Reference

  • Include file CComplex.inc
  • Defined in AfxNova/CComplex.inc:978
  • Documented in Numeric Datatypes/CComplex Class.md
  • Topic: CComplex Class