### The Maxima on-line user's manual

Algebra Calculator

#### Carg

Function: carg (<z>) Returns the complex argument of <z>. The complex argument is an angle `theta` in `(-%pi, %pi]` such that `r exp (theta %i) = <z>` where `r` is the magnitude of <z>.

`carg` is a computational function, not a simplifying function.

`carg` ignores the declaration `declare (<x>, complex)`, and treats <x> as a real variable. This is a bug. See also `abs` (complex magnitude), `polarform`, `rectform`, `realpart`, and `imagpart`.

Examples:

```          (%i1) carg (1);
(%o1)                           0
(%i2) carg (1 + %i);
%pi
(%o2)                          ---
4
(%i3) carg (exp (%i));
(%o3)                           1
(%i4) carg (exp (%pi * %i));
(%o4)                          %pi
(%i5) carg (exp (3/2 * %pi * %i));
%pi
(%o5)                         - ---
2
(%i6) carg (17 * exp (2 * %i));
(%o6)                           2```

```(%o1)                                true
(%i2) ```

### Related Examples

carg(1+%i);

Calculate

##### carg-solve

solve(carg(0.4*(%i*w+...

Calculate

realpart(((1-(%i)*sqr...

imagpart(((1-(%i)*sqr...

Calculate

##### carg-float

float(carg(2+i*3));

Calculate

##### carg-linsolve-plot2d-rhs

/* Op-amp integrator,...

/* SSM2164 gain cell ...

/* Input to the gain ...

Calculate

##### carg-linsolve-plot2d-rhs-sin

eq1: Vint=-Iint/(s*C);

eq2: Iint=k*Iin;

eq3: Iin=Vin/30000 + ...

Calculate

##### carg-linsolve-plot3d-rhs

eq1: Vint=-Iint/(s*C);

eq2: Iint=k*Iin;

eq3: Iin=Vin/30000 + ...

Calculate

##### carg-linsolve-plot3d-rhs

eq1: Vint=-Iint/(s*C);

eq2: Iint=k*Iin;

eq3: Iin=Vin/30000 + ...

Calculate

##### carg-linsolve-plot3d-rhs

eq1: Vint=-Iint/(s*C);

eq2: Iint=k*Iin;

eq3: Iin=Vin/30000 + ...

Calculate

##### carg

mnewton([carg(0.4*(%i...

Calculate