-
Notifications
You must be signed in to change notification settings - Fork 0
/
examples.sh
78 lines (70 loc) · 1.86 KB
/
examples.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
hash ./ppm
result=$?
if [ $result != 0 ]; then
echo "Please build ppm via build.sh"
exit
fi
declare -a maths=("unformatted string"
"x"
"x + 1"
"x + y"
"x - 1"
"x - y"
"x + 3 + 4"
"x / 2"
"x / y"
"a^5+7"
"e^(x/2/3)"
"e^x/2/3"
"xx / yyy"
"xxx / yy"
"x^e"
"xx^ee / yy"
"xx^ee / yy - zz"
"x^y^z^w - y"
"x^4^3 - 3/6"
"x^(-3/6)"
"(-3/6)"
"(-1 - 3/6)"
"(-1/x - 3)"
"3 + x + y + 3/4/5/6"
"sin(x)"
"sin(x^2)"
"sin(x + 3.1)"
"sin(x) + 1"
"sin(x^2) + 1"
"sin(x/y/z)"
"sin(x, x)"
"sin(x, x, x)"
"cos(x, y^2, x)"
"cos(x, x, Y^2^3)"
"sin(x) = 1"
"sin(2) = 1"
"sin(x / 2) = 1"
"(3 + (4/5/6) + 5) / 7"
"x = y^2"
"x = sin(x)"
"x = y^2^sin(y)"
"y^2 = x"
"y^2 = x^2"
"y == x"
"y^2 = sin(x^2)")
for math in "${maths[@]}"; do
./ppm --font smscript "$math"
echo ""
./ppm --font small "$math"
echo ""
./ppm --font big "$math"
echo ""
./ppm --font banner "$math"
echo ""
done
declare -a inputs=("-4 + 5^2^3^5 + 5")
for math in "${inputs[@]}"; do
./ppm --input "$math"
done
declare -a bigs=("x/y/z + 55.1")
for math in "${bigs[@]}"; do
./ppm --font big "$math"
done