4 (if maxima = 'maxima then load (namespaces), 0);
8 ''(?find\-package ("MAXIMA"));
14 ''(?find\-package ("$FOO"));
20 [foo|f, foo|g, foo|hh, foo|my_constant];
22 external_symbols (foo);
26 [foo|f(foo|x), foo|g(foo|n), foo|hh(foo|z)];
34 string ('foo|my_constant);
37 ('foo|my_constant, ev (%%));
40 (my_constant : 1729, [is (my_constant = foo|my_constant), is ('my_constant = 'foo|my_constant)]);
43 (my_constant : 1 - %pi, is (my_constant = foo|my_constant));
46 (hh(x) := (1/2) * x^2, 0);
52 map (fundef, [f, g, hh, foo|hh]);
53 [foo|f(foo|x) := foo|my_constant*sin(foo|x),
54 foo|g(foo|n) := expand ((foo|f(foo|a) + foo|n!)^foo|n),
56 foo|hh(foo|z) := foo|f(foo|z) - foo|g(2)];
62 5168743489*sin(foo|a)^3 + 53809938*sin(foo|a)^2 + 186732*sin(foo|a) + 216;
68 -1729*sin(v - u) - 2989441*sin(foo|a)^2 - 6916*sin(foo|a) - 4;
80 ''(?find\-package ("$AA"));
85 (f_aa (p, q) := (q - p)/x_aa, 0);
94 maxima|my_constant, numer;
97 maxima|foo|my_constant;
101 ''(?find\-package ("$BB"));
106 (f_bb (r) := exp(r) - 1, [lhs (%%), rhs (%%)]);
107 [f_bb(r), maxima|exp(r) - 1];
110 ''(?find\-package ("$CC"));
112 x_cc : maxima|foo|my_constant - maxima|my_constant;
118 (f_cc (s, t) := x_cc * s / t, [lhs (%%), rhs (%%)]);
119 [f_cc(s, t), x_cc * s / t];
121 in_namespace (maxima);
122 ''(?find\-package ("MAXIMA"));
125 ''(?find\-package ("MAXIMA"));
127 aa|bb|cc|f_cc (aa|x_aa, aa|bb|x_bb);
128 (%pi + 1728)*(aa|z_aa + aa|y_aa)/sin(aa|bb|y_bb);
131 ''(?find\-package ("$XX"));
134 ''(?find\-package ("$YY"));
137 ''(?find\-package ("$ZZ"));
140 fgh (xyz) := xyz^abc,
148 ''(?find\-package ("$ZZ"));
150 in_namespace (maxima);
151 ''(?find\-package ("MAXIMA"));
153 [xx, xx|yy, xx|yy|zz];
154 ''([?find\-package ("$XX"), ?find\-package ("$YY"), ?find\-package ("$ZZ")]);
156 [xx|yy|zz|abc, xx|yy|zz|pqr];
157 [7654, xx|yy|zz|uvw^7654];
159 (fundef (xx|yy|zz|fgh), [lhs (%%), rhs (%%)]);
160 [xx|yy|zz|fgh (xx|yy|zz|xyz), xx|yy|zz|xyz^xx|yy|zz|abc];
162 in_namespace (maxima|xx|yy|zz);
163 ''(?find\-package ("$ZZ"));
168 in_namespace (maxima|xx|yy);
169 ''(?find\-package ("$YY"));
174 in_namespace (maxima|xx);
175 ''(?find\-package ("$XX"));
181 [maxima|foo, maxima|aa, maxima|aa|bb, maxima|aa|bb|cc, maxima|xx, maxima|xx|yy, maxima|xx|yy|zz];
183 in_namespace (maxima);
184 ''(?find\-package ("MAXIMA"));
187 [foo, aa, aa|bb, aa|bb|cc, xx, xx|yy, xx|yy|zz];
190 [[xx|yy|zz|abc, xx|yy|zz|fgh]];
198 /* verify that keywords are recognized */
200 in_namespace (maxima|xx|yy);
201 ''(?find\-package ("$YY"));
203 if true then 1 elseif false then -1 else 0;
206 if false then 1 elseif true then -1 else 0;
209 for x in [1, 2, 3] do x;
212 for i:1 thru 10 do i;
215 /* verify that operators are recognized */
253 is (equal (x, (x^2 + x)/(x + 1)));
256 is (notequal (x, (x^2 + x)/(x + 1)));
259 is (notequal (x, y));
262 (defstruct (foo (a=1, b=2)), new (foo), [%%@a, %%@b]);
265 in_namespace (maxima);
266 ''(?find\-package ("MAXIMA"));