Help Center

CAbs2function

Returns the squared magnitude of a complex number, otherwise known as the complex norm.

Numeric DatatypesfunctionAfxComplex.incdocumented

Syntax

FUNCTION CAbs2 () AS DOUBLE
Also documented as CNorm — one description covers them all.

Description

Returns the squared magnitude of a complex number, otherwise known as the complex norm.

Example

DIM z AS _complex = (2, 3) DIM d AS DOUBLE = CAbs2(z) PRINT d Output: 13 --or-- DIM z AS _complex = (2, 3) DIM d AS DOUBLE = CNorm(z) PRINT d Output: 13

Reference

  • Include file AfxComplex.inc
  • Defined in AfxNova/AfxComplex.inc:609
  • Documented in Numeric Datatypes/Complex Numbers Procedures.md
  • Topic: Complex Numbers Procedures