Windows installer: Update help text for the maxima_longnames program.
[maxima/cygwin.git] / tests / rtestmcond_display.mac
blob60ced619bb4dfb55d865b40e60f5c62446ea7a23
1 kill (all);
2 done;
4 string ('(if a > b then c else d));
5 "if a > b then c else d";
7 string ('if a > b then c else d);
8 "if a > b then c else d";
10 string ('(if a > b then c));
11 "if a > b then c";
13 string ('if a > b then c);
14 "if a > b then c";
16 string ('(if a then if b then if c then d else if e then f else g else if h then i else j else k));
17 "if a then (if b then (if c then d else (if e then f else g)) else (if h then i else j)) else k";
19 string ('if a then 'if b then 'if c then d else 'if e then f else g else 'if h then i else j else k);
20 "if a then (if b then (if c then d else (if e then f else g)) else (if h then i else j)) else k";
22 string ('(if a then b));
23 "if a then b";
25 string ('(if a then b else d));
26 "if a then b else d";
28 string ('(if a then b elseif c then false));
29 "if a then b elseif c then false";
31 string ('(if a then b elseif c then d));
32 "if a then b elseif c then d";
34 string ('(if a then b elseif c then d else f));
35 "if a then b elseif c then d else f";
37 string ('(if a then b elseif c then d elseif e then false));
38 "if a then b elseif c then d elseif e then false";
40 string ('(if a then b elseif c then d elseif e then f));
41 "if a then b elseif c then d elseif e then f";
43 string ('(if a then b elseif c then d elseif e then f else h));
44 "if a then b elseif c then d elseif e then f else h";
46 string ('(if a then b elseif c then d elseif e then f elseif g then false));
47 "if a then b elseif c then d elseif e then f elseif g then false";
49 string ('(if a then b elseif c then d elseif e then f elseif g then h));
50 "if a then b elseif c then d elseif e then f elseif g then h";
52 string ('if a then b);
53 "if a then b";
55 string ('if a then b else d);
56 "if a then b else d";
58 string ('if a then b elseif c then false);
59 "if a then b elseif c then false";
61 string ('if a then b elseif c then d);
62 "if a then b elseif c then d";
64 string ('if a then b elseif c then d else f);
65 "if a then b elseif c then d else f";
67 string ('if a then b elseif c then d elseif e then false);
68 "if a then b elseif c then d elseif e then false";
70 string ('if a then b elseif c then d elseif e then f);
71 "if a then b elseif c then d elseif e then f";
73 string ('if a then b elseif c then d elseif e then f else h);
74 "if a then b elseif c then d elseif e then f else h";
76 string ('if a then b elseif c then d elseif e then f elseif g then false);
77 "if a then b elseif c then d elseif e then f elseif g then false";
79 string ('if a then b elseif c then d elseif e then f elseif g then h);
80 "if a then b elseif c then d elseif e then f elseif g then h";
82 (a: z^3,
83 b: q/p,
84 c: x < 1024,
85 d: 1729.0,
86 e: 'if a > b then c else d,
87 f: 'if c < d then a elseif c < b then e else g,
88 g: abs(r),
89 h: %pi*e,
90 0);
93 string ('if a then b);
94 "if z^3 then q/p";
96 string ('if a then b else d);
97 "if z^3 then q/p else 1729.0";
99 string ('if a then b elseif c then false);
100 "if z^3 then q/p elseif x < 1024 then false";
102 string ('if a then b elseif c then d);
103 "if z^3 then q/p elseif x < 1024 then 1729.0";
105 string ('if a then b elseif c then d else f);
106 "if z^3 then q/p elseif x < 1024 then 1729.0 else (if x < 1024 < 1729.0 then z^3 elseif x < 1024 < q/p then (if z^3 > q/p then x < 1024 else 1729.0) else g)";
108 string ('if a then b elseif c then d elseif e then false);
109 "if z^3 then q/p elseif x < 1024 then 1729.0 elseif (if z^3 > q/p then x < 1024 else 1729.0) then false";
111 string ('if a then b elseif c then d elseif e then f);
112 "if z^3 then q/p elseif x < 1024 then 1729.0 elseif (if z^3 > q/p then x < 1024 else 1729.0) then (if x < 1024 < 1729.0 then z^3 elseif x < 1024 < q/p then (if z^3 > q/p then x < 1024 else 1729.0) else g)";
114 string ('if a then b elseif c then d elseif e then f else h);
115 "if z^3 then q/p elseif x < 1024 then 1729.0 elseif (if z^3 > q/p then x < 1024 else 1729.0) then (if x < 1024 < 1729.0 then z^3 elseif x < 1024 < q/p then (if z^3 > q/p then x < 1024 else 1729.0) else g) else %pi*(if z^3 > q/p then x < 1024 else 1729.0)";
117 string ('if a then b elseif c then d elseif e then f elseif g then false);
118 "if z^3 then q/p elseif x < 1024 then 1729.0 elseif (if z^3 > q/p then x < 1024 else 1729.0) then (if x < 1024 < 1729.0 then z^3 elseif x < 1024 < q/p then (if z^3 > q/p then x < 1024 else 1729.0) else g) elseif abs(r) then false";
120 string ('if a then b elseif c then d elseif e then f elseif g then h);
121 "if z^3 then q/p elseif x < 1024 then 1729.0 elseif (if z^3 > q/p then x < 1024 else 1729.0) then (if x < 1024 < 1729.0 then z^3 elseif x < 1024 < q/p then (if z^3 > q/p then x < 1024 else 1729.0) else g) elseif abs(r) then %pi*(if z^3 > q/p then x < 1024 else 1729.0)";
123 (postfix ("abc"), postfix ("xyz"), grind: true, linel: 65, 0);
126 /* NOTE: the literal strings in the remainder of this file
127  * contain embedded tabs and newlines.
128  */
129 string (my_union(x,y):=if x = [] then y
130           else (if member(t:first(x),y) then my_union(rest(x),y)
131                     else cons(t,my_union(rest(x),y)))); 
132 "my_union(x,y):=if x = [] then y
133           else (if member(t:first(x),y) then my_union(rest(x),y)
134                     else cons(t,my_union(rest(x),y)))" ; 
136 string (g(l):=catch(map(lambda([x],if x < 0 then throw(x) else f(x)),l))); 
137 "g(l):=catch(map(lambda([x],if x < 0 then throw(x) else f(x)),l))" ; 
139 string (typeof(x):=block([q],if numberp(x) then return(algebraic),
140        if not atom(x) then return(maplist(typeof,x)),
141        q:get(x,type),
142        if q = false then error("not numeric") else q)); 
143 "typeof(x):=block([q],if numberp(x) then return(algebraic),
144        if not atom(x) then return(maplist(typeof,x)),
145        q:get(x,type),
146        if q = false then error(\"not numeric\") else q)" ; 
148 string (closeto(e,tol):=block([numer:true,abse],abse:abs(e),
149         if abse < tol then true else abse)); 
150 "closeto(e,tol):=block([numer:true,abse],abse:abs(e),
151         if abse < tol then true else abse)" ; 
153 string (fib[n]:=if n = 1 or n = 2 then 1 else fib[n-1]+fib[n-2]); 
154 "fib[n]:=if n = 1 or n = 2 then 1 else fib[n-2]+fib[n-1]" ; 
156 string (eta(mu,nu):=if mu = nu then mu
157      else (if mu > nu then mu-nu else mu+nu)); 
158 "eta(mu,nu):=if mu = nu then mu
159      else (if mu > nu then mu-nu else nu+mu)" ; 
161 string ('(if not 5 >= 2 and 6 <= 5 or 5 > 3 then a else b)); 
162 "if 5 < 2 and 6 <= 5 or 5 > 3 then a else b" ; 
164 string ('(for i thru 10 do
165       (guess:subst(guess,x,0.5*(x+10/x)),
166        if abs(guess^2-10) < 1/20000 then return(guess)))); 
167 "for i thru 10 do
168     (guess:subst(guess,x,0.5*(x+10/x)),
169      if abs(guess^2-10) < 1/20000 then return(guess))" ; 
171 string (newton(f,guess):=block([numer,y],local(f,df,x,guess),numer:true,
172        define(df(x),diff(f(x),x)),
173        do (y:df(guess),
174            if y = 0 then error("derivative at",guess,"is zero"),
175            guess:guess-f(guess)/y,
176            if abs(f(guess)) < 1/200000 then return(guess)))); 
177 "newton(f,guess):=block([numer,y],local(f,df,x,guess),numer:true,
178        define(df(x),diff(f(x),x)),
179        do (y:df(guess),
180            if y = 0 then error(\"derivative at\",guess,\"is zero\"),
181            guess:guess-f(guess)/y,
182            if abs(f(guess)) < 1/200000 then return(guess)))" ; 
184 string ('(extremal_subset(set(2*sqrt(7),1.4b0,a,b+a),
185                   lambda([x],if atom(x) then 0 else 1),max))); 
186 "extremal_subset({2*sqrt(7),1.4b0,a,b+a},
187                 lambda([x],if atom(x) then 0 else 1),max)" ; 
189 string (rprimep(i,j):=block([],
190         if integerp(i) and integerp(j)
191             then (if gcd(i,j) > 1 then 0 else 1)
192             else funmake(rprimep,[i,j]))); 
193 "rprimep(i,j):=block([],
194         if integerp(i) and integerp(j)
195             then (if gcd(i,j) > 1 then 0 else 1)
196             else funmake(rprimep,[i,j]))" ; 
198 string ('(extremal_subset(set(2*sqrt(7),1.4b0,a,b+a),
199                   lambda([x],
200                          if foo(x)
201                              then (if atom(x) then 0
202                                        else 1)! abc! xyz!
203                              else (if bar(x) then glob
204                                        else blurf)),max))); 
205 "extremal_subset({2*sqrt(7),1.4b0,a,b+a},
206                 lambda([x],
207                        if foo(x)
208                            then (if atom(x) then 0
209                                      else 1)! abc! xyz!
210                            else (if bar(x) then glob
211                                      else blurf)),max)" ;