summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-15 23:45:48 -0600
committerMike Buland <mike@xagasoft.com>2013-04-15 23:45:48 -0600
commit44542adf023315d60a8ffc4863f2b161b3c1eb90 (patch)
tree3500c1d6cfa3e5670bde199e24125c4b8e0c33db /src/main.cpp
parentf34eb76357fdfc314d6451fd11a2e4d6fcfce434 (diff)
downloadclic-44542adf023315d60a8ffc4863f2b161b3c1eb90.tar.gz
clic-44542adf023315d60a8ffc4863f2b161b3c1eb90.tar.bz2
clic-44542adf023315d60a8ffc4863f2b161b3c1eb90.tar.xz
clic-44542adf023315d60a8ffc4863f2b161b3c1eb90.zip
Addition, subtraction, and multiplication work now
Division isn't working yet, there are too many options, I'll figure out something eventually :-P
Diffstat (limited to '')
-rw-r--r--src/main.cpp117
1 files changed, 113 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index be49a1d..d78bfc3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -33,21 +33,130 @@ void numbertest1()
33{ 33{
34 println("-==- Number test -==-"); 34 println("-==- Number test -==-");
35 35
36 Number a("523"); 36 Number a("1000902491523000321");
37 Number b("498"); 37 Number b("3004392012498000700");
38 38
39 println("%1 + %2 = %3"). 39 println("%1 + %2 = %3").
40 arg( a.toString() ). 40 arg( a.toString() ).
41 arg( b.toString() ). 41 arg( b.toString() ).
42 arg( (a + b).toString() ); 42 arg( (a + b).toString() );
43
44 println("%1 * %2 = %3").
45 arg( a.toString() ).
46 arg( b.toString() ).
47 arg( (a * b).toString() );
48
49 a = "-872";
50 b = "123";
51
52 println("%1 + %2 = %3").
53 arg( a.toString() ).
54 arg( b.toString() ).
55 arg( (a + b).toString() );
56
57 a = "728";
58 b = "-51";
59
60 println("%1 + %2 = %3").
61 arg( a.toString() ).
62 arg( b.toString() ).
63 arg( (a + b).toString() );
64
65 a = "44";
66 b = "-55";
67
68 println("%1 + %2 = %3").
69 arg( a.toString() ).
70 arg( b.toString() ).
71 arg( (a + b).toString() );
72
73 a = "44";
74 b = "-66";
75
76 println("%1 + %2 = %3").
77 arg( a.toString() ).
78 arg( b.toString() ).
79 arg( (a + b).toString() );
80
81 a = "44";
82 b = "-66";
83
84 println("%1 - %2 = %3").
85 arg( a.toString() ).
86 arg( b.toString() ).
87 arg( (a - b).toString() );
88
89 a = "44";
90 b = "66";
91
92 println("%1 - %2 = %3").
93 arg( a.toString() ).
94 arg( b.toString() ).
95 arg( (a - b).toString() );
96
97 a = "7814";
98 b = "24";
99
100 println("%1 * %2 = %3").
101 arg( a.toString() ).
102 arg( b.toString() ).
103 arg( (a * b).toString() );
104
105 a = "12345";
106 b = "678";
107
108 println("%1 * %2 = %3").
109 arg( a.toString() ).
110 arg( b.toString() ).
111 arg( (a * b).toString() );
112
113 a = "3592846";
114 b = "944634757";
115
116 println("%1 * %2 = %3").
117 arg( a.toString() ).
118 arg( b.toString() ).
119 arg( (a * b).toString() );
120
121 a = "3592846";
122 b = "";
123
124 println("%1 * %2 = %3").
125 arg( a.toString() ).
126 arg( b.toString() ).
127 arg( (a * b).toString() );
128
129 a = "123";
130 b = "-45";
131
132 println("%1 * %2 = %3").
133 arg( a.toString() ).
134 arg( b.toString() ).
135 arg( (a * b).toString() );
136
137 a = "-123";
138 b = "45";
139
140 println("%1 * %2 = %3").
141 arg( a.toString() ).
142 arg( b.toString() ).
143 arg( (a * b).toString() );
144
145 a = "-123";
146 b = "-45";
147
148 println("%1 * %2 = %3").
149 arg( a.toString() ).
150 arg( b.toString() ).
151 arg( (a * b).toString() );
43} 152}
44 153
45int main( int argc, char *argv[] ) 154int main( int argc, char *argv[] )
46{ 155{
47 println("CliC"); 156 println("CliC");
48 157
49 packedtest1(); 158// packedtest1();
50// numbertest1(); 159 numbertest1();
51 160
52 return 0; 161 return 0;
53} 162}