1 | test_mixedprint = ->
|
2 | run_test [
|
3 |
|
4 | "1.0",
|
5 | "1.0",
|
6 |
|
7 | "print(\"hello\")",
|
8 | "\"hello\"",
|
9 |
|
10 | "-sqrt(2)/2",
|
11 | "-1/2*2^(1/2)",
|
12 |
|
13 | "printplain",
|
14 | "-1/2 2^(1/2)",
|
15 |
|
16 | "printfull",
|
17 | "-1/2*2^(1/2)",
|
18 |
|
19 | "printlatex",
|
20 | "-\\frac{\\sqrt{2}}{2}",
|
21 |
|
22 | "printlist",
|
23 | "(multiply -1/2 (power 2 1/2))",
|
24 |
|
25 | "printlist(a+b)\nprintlist(c+d)",
|
26 | "(add a b)(add c d)",
|
27 |
|
28 | "print2dascii",
|
29 | " 1 1/2\n- --- 2\n 2",
|
30 |
|
31 | "last2dasciiprint",
|
32 | "\" 1 1/2\n- --- 2\n 2\"",
|
33 |
|
34 |
|
35 |
|
36 | "x=0\ny=2\nfor(do(x=sqrt(2+x),y=2*y/x,printfull(y)),k,1,2)",
|
37 | "2*2^(1/2)4*2^(1/2)/((2+2^(1/2))^(1/2))",
|
38 |
|
39 | "clearall",
|
40 | "",
|
41 |
|
42 | "print2dascii([[a,b],[c,d]])",
|
43 | "a b\n\nc d",
|
44 |
|
45 | "print2dascii(1/sqrt(-15))",
|
46 | " 1/2\n (-1)\n- -----------\n 1/2 1/2\n 3 5",
|
47 |
|
48 | "print2dascii(x^(1/a))",
|
49 | " 1/a\nx",
|
50 |
|
51 | "print2dascii(x^(a/b))",
|
52 | " a/b\nx",
|
53 |
|
54 | "print2dascii(x^(a/2))",
|
55 | " 1/2 a\nx",
|
56 |
|
57 | "print2dascii(x^(1/(a+b)))",
|
58 | " 1/(a + b)\nx",
|
59 |
|
60 | ]
|