Share via


norm, normf, norml

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at norm, normf, norml1.

Retrieves the squared magnitude of a complex number.

Syntax

double norm(   
   _Dcomplex z   
);  
float norm(   
   _Fcomplex z   
);  // C++ only  
long double norm(   
  _Lcomplex z   
);  // C++ only  
float normf(   
   _Fcomplex z   
);  
long double norml(   
   _Lcomplex z   
);  

Parameters

z
A complex number.

Return Value

The squared magnitude of z.

Remarks

Because C++ allows overloading, you can call overloads of norm that take _Fcomplex or _Lcomplex values, and return float or long double values. In a C program, norm always takes a _Dcomplex value and returns a double value.

Requirements

Routine C header C++ header
norm, normf, norml <complex.h> <ccomplex>

For more compatibility information, see Compatibility in the Introduction.

See Also

Alphabetical Function Reference
creal, crealf, creall
cproj, cprojf, cprojl
conj, conjf, conjl
cimag, cimagf, cimagl
carg, cargf, cargl
cabs, cabsf, cabsl