File: rtest_ask.mac

package info (click to toggle)
maxima 5.21.1-2squeeze
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 94,928 kB
  • ctags: 43,849
  • sloc: lisp: 298,974; fortran: 14,666; perl: 14,325; tcl: 10,494; sh: 4,052; makefile: 2,975; ansic: 471; awk: 24; sed: 7
file content (22 lines) | stat: -rwxr-xr-x 392 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Test askinteger and asksign */

(kill(all),0);
0$

map(askinteger,[0,1/2,sqrt(17)]);
[yes,no,no]$

/* Known constants */
map(askinteger,[%pi,%e,%phi,%gamma,%i]);
[no,no,no,no,no]$



map(asksign,[%pi,%e,%phi,%gamma,inf,minf]);
[pos,pos,pos,pos,pos,neg]$

errcatch(asksign(%i));
[]$ /* argument cannot be imaginary. */

errcatch(asksign(infinity));
[]$ /* sign of infinity is undefined. */