Use 1//2 instead of ((rat simp) 1 2)
[maxima.git] / share / algebra / charsets / rtestflatten.mac
blob67208e5c95f0ccdb6aa174eb42d22f60898c938a
1 (kill(all), load("charsets_flatten.lisp"), 0);
2 0$
4 charsets_flatten(3);
5 3$
7 charsets_flatten(-3);
8 -3$
10 charsets_flatten(2/3);
11 2/3$
13 charsets_flatten(-2/3);
14 -2/3$
16 charsets_flatten(1.4d2);
17 1.4d2$
19 charsets_flatten(-3.4d0);
20 -3.4d0$
22 charsets_flatten(x);
25 charsets_flatten(abc);
26 abc$
28 charsets_flatten(%pi);
29 %pi$
31 charsets_flatten(rat(x));
34 charsets_flatten(x[5]);
35 x[5]$
37 charsets_flatten(x[8,32]);
38 x[8,32]$
40 charsets_flatten(-x);
41 -x$
43 charsets_flatten(rat(-x));
44 -x$
46 charsets_flatten(a+b);
47 a+b$
49 charsets_flatten(rat(a+b));
50 a+b$
52 charsets_flatten(a*b);
53 a*b$
55 charsets_flatten(a/b);
56 a/b$
58 charsets_flatten(a*b*c);
59 a*b*c$
61 charsets_flatten(a^b);
62 a^b$
64 charsets_flatten(a^(a^b));
65 a^(a^b)$
67 charsets_flatten([]);
68 []$
70 charsets_flatten([[]]);
71 []$
73 charsets_flatten([x]);
74 [x]$
76 charsets_flatten([[x]]);
77 [x]$
79 charsets_flatten(f(g(f(f(x)))));
80 f(g(f(f(x))))$
82 charsets_flatten(f(f(g(f(x)))));
83 f(g(f(x)))$
85 /* Examples from Macsyma 422 */
87 charsets_flatten([a,b,[c,[d]],e,[[f],g,h]]);
88 [a,b,c,d,e,f,g,h]$
90 charsets_flatten([a,b([c]),[d]]);
91 [a,b([c]),d]$
93 charsets_flatten(f(f(a,b), f(c,d)));
94 f(a,b,c,d)$
96 charsets_flatten(f[1](f[1](a,b), f[1](c,d)));
97 f[1](a,b,c,d)$
100 /* every tests */
101 charsets_every([]);
102 false$
103 charsets_every([false]);
104 false$
105 charsets_every([false,false]);
106 false$
107 charsets_every(false);
108 false$
109 charsets_every(false,false);
110 false$
111 charsets_every(true);
112 true$
113 charsets_every([true]);
114 true$
115 charsets_every([true,true]);
116 true$
117 charsets_every(true,true);
118 true$
119 charsets_every([true,false]);
120 false$
121 charsets_every(true,false);
122 false$