summaryrefslogtreecommitdiff
path: root/src/unitparser.cpp
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2014-10-30 13:15:19 -0600
committerMike Buland <mike@xagasoft.com>2014-10-30 13:15:19 -0600
commit7026b96ec807b169f7b413056e52412ae422ea9d (patch)
tree9a597b31b8c7d6a8781b45d1bbf27c258bb6a3a4 /src/unitparser.cpp
parent18a2be05bfacddcb7398f1b197bd1a5876c9a0cb (diff)
downloadclic-7026b96ec807b169f7b413056e52412ae422ea9d.tar.gz
clic-7026b96ec807b169f7b413056e52412ae422ea9d.tar.bz2
clic-7026b96ec807b169f7b413056e52412ae422ea9d.tar.xz
clic-7026b96ec807b169f7b413056e52412ae422ea9d.zip
The new division works great!
Other minor bug fixes including scale issues, digit() access stopped a digit before the final possible digit in the scale, >, >=, <, <= all work correctly with mixed scale numbers now, probably other fixes.
Diffstat (limited to 'src/unitparser.cpp')
-rw-r--r--src/unitparser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unitparser.cpp b/src/unitparser.cpp
index 891f7b3..43dacfc 100644
--- a/src/unitparser.cpp
+++ b/src/unitparser.cpp
@@ -33,7 +33,7 @@ void UnitParser::order1()
33 unitTest(parse("2+3*5") == "17"); 33 unitTest(parse("2+3*5") == "17");
34 unitTest(parse("2+3-5") == "0"); 34 unitTest(parse("2+3-5") == "0");
35 unitTest(parse("(2+3)*5") == "25"); 35 unitTest(parse("(2+3)*5") == "25");
36 unitTest(parse("1.59*40/24*21", 5) == "55.125"); 36 unitTest(parse("1.59*40/24*21", 5) == "55.65");
37 unitTest(parse("1.59*40/(24*21)", 5) == "0.125"); // bc says it's this: "0.12619"); 37 unitTest(parse("1.59*40/(24*21)", 5) == "0.12619"); // bc says it's this: "0.12619");
38} 38}
39 39