1 /* Test askinteger and asksign
4 * This test file is intended to be run with `batch_answers_from_file' to true.
8 * maxima --batch-string='batch_answers_from_file:true; batch("tests/rtest_ask1.mac", test);'
10 * Note that setting `batch_answers_from_file' to true is not needed when `batch(...,test)'
11 * is executed via the `batch-string' command-line option. It is needed if the test is done
12 * from within a Maxima session.
19 (?trace(?\$asksign),0);
23 /* commit 3137b946 tried to fix *LOCAL-SIGNS* craziness,
24 * but screwed up in its own way. Fixed for good this time?
25 * Nicked from mailing list circa 2013-08-28
28 integrate(sin(omega*t)*exp(-s*t),t,0,inf); p;
31 [asksign (foo), sign (foo), sign (foo)]; p;
34 [asksign (foo), sign (foo), sign (foo)]; n;
37 [asksign (foo), sign (foo), sign (foo)]; z;
40 limit((exp(a*x)-1)/(exp(a*x)+1),x,inf); p;
43 limit((exp(a*x)-1)/(exp(a*x)+1),x,inf); n;
46 limit((exp(a*x)-1)/(exp(a*x)+1),x,inf); z;
49 /* mailing list 2017-11-25: "bug in Laplace transform"
50 * root cause is asksign(-a^2) forgot the minus sign,
51 * so include some cases to handle that and then the Laplace transform.
171 asksign (a^2*b^2);nz;
183 asksign (-a^2*b^2);z;
186 asksign (-a^2*b^2);nz;
189 asksign (-a^2*b^3);p;
192 asksign (-a^2*b^3);n;
195 asksign (-a^2*b^3);z;
201 asksign (a^2*b^4);nz;
213 asksign (-a^2*b^4);z;
216 asksign (-a^2*b^4);nz;
219 asksign (-a^2*b^5);p;
222 asksign (-a^2*b^5);n;
225 asksign (-a^2*b^5);z;
228 /* here's the Laplace transform that exposed the bug */
230 laplace (delta (t - x^2), t, s);z;
233 laplace (delta (t - x^2), t, s);nz;