cabs

Computes the absolute value of the complex number value by a square root calculation.

Library:LibC
Classification:POSIX
Service:Math

Syntax

  #include <math.h> 
   
  double cabs (
     __COMPLEX   value);
  

Parameters

value

(IN) Specifies the value of the complex number.

Return Values

Returns the absolute value.

In certain cases, overflow errors can occur that cause the matherr routine to be invoked.

Remarks

The cabs function computes the absolute value of the complex number value by a calculation that is equivalent to

  sqrt ((value.real * value.real) + (value.imag * value.imag))