summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-19 20:08:05 -0600
committerMike Buland <mike@xagasoft.com>2013-04-19 20:08:05 -0600
commit06e46b0e904ca279e6e397c9f9040cf0f059b930 (patch)
tree054e2ac152ffce28d98546bdabf8083887038e11 /src/main.cpp
parent7260c36973fc0ad7ff24294ff5540d64bf32c334 (diff)
downloadclic-06e46b0e904ca279e6e397c9f9040cf0f059b930.tar.gz
clic-06e46b0e904ca279e6e397c9f9040cf0f059b930.tar.bz2
clic-06e46b0e904ca279e6e397c9f9040cf0f059b930.tar.xz
clic-06e46b0e904ca279e6e397c9f9040cf0f059b930.zip
Corrected bugs in division scaling and string parsing.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a9b0072..4e51020 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -259,9 +259,9 @@ void ordertest()
259 259
260void radixtest() 260void radixtest()
261{ 261{
262 Number a( 0, 16 ), b( 0, 16 ); 262 Number a( 10, 16 ), b( 10, 16 );
263 263
264 a = "f8a72bce3"; 264 a = "1f8a72bbce3";
265 b = "9ea8cb3"; 265 b = "9ea8cb3";
266 println("%1 + %2 = %3"). 266 println("%1 + %2 = %3").
267 arg( a ). 267 arg( a ).
@@ -290,6 +290,12 @@ void fractest()
290 a = "12"; 290 a = "12";
291 b = "4"; 291 b = "4";
292 println("%1 / %2 = %3").arg( a ).arg( b ).arg( a / b ); 292 println("%1 / %2 = %3").arg( a ).arg( b ).arg( a / b );
293
294 a = Number( 100 );
295 b = Number( 100 );
296 a = "9";
297 b = "1.9";
298 println("%1 / %2 = %3").arg( a ).arg( b ).arg( a / b );
293} 299}
294 300
295int main( int , char *[] ) 301int main( int , char *[] )
@@ -297,9 +303,9 @@ int main( int , char *[] )
297 println("CliC"); 303 println("CliC");
298 304
299// packedtest1(); 305// packedtest1();
300// numbertest1(); 306 numbertest1();
301// numbertestcomp(); 307 numbertestcomp();
302// radixtest(); 308 radixtest();
303 fractest(); 309 fractest();
304// ordertest(); 310// ordertest();
305 311