Help Center

CNormfunction

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

Numeric DatatypesfunctionAfxComplex.incdocumented

Syntax

FUNCTION CNorm () AS DOUBLE
Also documented as CAbs2 — 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:614
  • Documented in Numeric Datatypes/Complex Numbers Procedures.md
  • Topic: Complex Numbers Procedures