Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

cabs - calculate absolute value of complex number (BS2000)

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

double cabs(__complex z);

Description

cabs() calculates the absolute value of a complex number z.

struct (__complex z) is a complex number z with real part x and imaginary part y.

__complex is a type predefined in the header math.h:

#typdef struct{double x, y;} __complex

Return val.

Absolute value of the complex number z if successful.

If an overflow occurs, the program aborts (signal SIGFPE).

See also

abs(), fabs(), labs(), sqrt(), math.h.