ParanoidNumbers work except for the simplifying bit...
[ipdf/code.git] / src / tests / paranoidcalculator.cpp
index b9bd13a..c8f7524 100644 (file)
@@ -29,6 +29,7 @@ int main(int argc, char ** argv)
        float fa = da;
        while (cin.good())
        {
+               Debug("a is {%s} \"%.40lf\"", a.Str().c_str(), a.ToDouble());
                char op;
                cin >> op;
                token = "";
@@ -41,11 +42,12 @@ int main(int argc, char ** argv)
                        token += c;
                        c = cin.get();
                }
+               
                //Debug("String is \"%s\"", token.c_str());
                float fb = strtof(token.c_str(), NULL);
                double db = strtod(token.c_str(), NULL);
                ParanoidNumber b(token.c_str());
-               Debug("a is {%s} \"%lf\"", a.Str().c_str(), a.ToDouble());
+       
                Debug("b is {%s} \"%lf\"", b.Str().c_str(), b.ToDouble());
                Debug("db is %lf", db);
                switch (op)
@@ -74,9 +76,9 @@ int main(int argc, char ** argv)
                        
                Debug("a is: {%s}", a.Str().c_str());
                Debug("a as double: %.40lf", a.ToDouble());
-               Debug("a as float: %.40f", a.ToFloat());
-               Debug("a as int64_t: %ld", a.Convert<int64_t>());
-               Debug("floats give: %.40f", fa);
+               //Debug("a as float: %.40f", a.ToFloat());
+               //Debug("a as int64_t: %ld", a.Convert<int64_t>());
+               //Debug("floats give: %.40f", fa);
                Debug("double gives: %.40lf", da);
                
                

UCC git Repository :: git.ucc.asn.au