1 /*******************************************************************************
5 * The examples show what a Maxima user can expect from the carg function.
6 * Examples are taken from functions.wolfram.com.
8 ******************************************************************************/
10 /* ---------- Initialization ------------------------------------------------ */
15 declare([z,z1,z2],complex, n,integer);
18 /* ---------- Specific values ----------------------------------------------- */
38 /* ---------- Values at fixed points ---------------------------------------- */
106 /* --- Values at infinities ------------------------------------------------- */
108 carg([inf,-inf,minf,-minf,%i*inf,%i*minf,infinity]);
109 [0,%pi,%pi,0,%pi/2,-%pi/2,ind];
111 /* ---------- Parity -------------------------------------------------------- */
113 /* Add examples for Parity */
115 /* ---------- Mirror symmetry ----------------------------------------------- */
117 /* Add examples for Mirror symmetry */
119 /* ---------- Homogeneity --------------------------------------------------- */
133 /* ---------- Transformations ----------------------------------------------- */
135 /* ----- Argument involving complex characteristics ------------------------- */
145 /* Maxima does not simplify the following examples */
153 /* ----- Argument involving basic arithmetic operations --------------------- */
155 /* Add more examples for sums, products and quotients */
157 /* ----- Power of arguments -------------------------------------------------- */
167 atan2(sin(log(x)*'imagpart(z)),cos(log(x)*'imagpart(z)));
172 atan2(sin(a*'carg(z)),cos(a*'carg(z)));
175 atan2(sin('carg(z1)*'realpart(z2)+log(abs(z1))*'imagpart(z2)),
176 cos('carg(z1)*'realpart(z2)+log(abs(z1))*'imagpart(z2)));
178 /* ----- Exponent of arguments ---------------------------------------------- */
181 atan2(sin(y),cos(y));
183 /* ---------- Complex characteristics --------------------------------------- */
185 realpart(carg(x+%i*y));
188 imagpart(carg(x+%i*y));
197 conjugate(carg(x+%i*y));
200 signum(carg(x+%i*y));
203 /* ---------- End of file rtest_carg.mac ------------------------------------ */