---
name: "wn_cplx_norm_squared"
section: "3"
platform: "linux"
package: "libwn-dev"
version: "6.0-17"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/wncplx"
---

# wn\_cplx\_norm\_squared(3)

complex numbers

Part of [wncplx(3)](/wncplx/3.md).

## NAME

wn\_cplx\_norm, wn\_cplx\_to\_polar, wn\_polar\_to\_cplx, wn\_cplx\_make, wn\_cplx\_copy, wn\_cplx\_enter, wn\_cplx\_print, wn\_cplx\_add, wn\_cplx\_subtract, wn\_cplx\_multiply, wn\_cplx\_divide, wn\_cplx\_reciprical, wn\_cplx\_norm\_squared - complex numbers

## SYNOPSIS

```
#include <wn/wncplx.h>

typedef struct wn_cplx_struct *wn_cplx;
struct wn_cplx_struct
{
double real,imag;
};

void wn_cplx_make(wn_cplx *pnumber);
void wn_cplx_copy(wn_cplx out, wn_cplx in);

void wn_cplx_enter(wn_cplx c);
void wn_cplx_print(wn_cplx c);

void wn_cplx_add(wn_cplx result, wn_cplx c1, wn_cplx c2);
void wn_cplx_subtract(wn_cplx result, wn_cplx c1, wn_cplx c2);
void wn_cplx_multiply(wn_cplx result, wn_cplx c1, wn_cplx c2);
void wn_cplx_divide(wn_cplx result, wn_cplx c1, wn_cplx c2);
void wn_cplx_reciprical(wn_cplx result, wn_cplx c);

double wn_cplx_norm_squared(wn_cplx c);
double wn_cplx_norm(wn_cplx c);

void wn_cplx_to_polar(double *pr, double *ptheta, wn_cplx c);
void wn_polar_to_cplx(wn_cplx c, double r, double theta);
```

## DESCRIPTION

Routines for complex numbers.

## AUTHOR

Will Naylor
