Commit Graph

6 Commits

Author SHA1 Message Date
Stephan Aßmus
85d74ff62d Changed token type handling so that different chars can resolve to the same
token type (part of #3236). "/" now equals "\" and ":" to mean "divide by".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28921 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-17 14:19:36 +00:00
Stephan Aßmus
8d267d142a Fixed the "power" operator (^).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 22:15:13 +00:00
Stephan Aßmus
8443d21cf8 Included "Mike's Arbitrary Precision Math Library" in DeskCalc (BSD style
license) and rebased the ExpressionParser from double on the MAPM data type.
Currently, the binary operators are not supported anymore, but the imprecise
calculations were getting on my nerves. I think a lot more neat functions
could now be supported, but I have not looked into it further. I also didn't
dare look closer at the C code of the library, but it seems to be well
tested. It's portable by all means, I guess even if the target platform has
8.3 char file names to hold the code... Luckily, the library inclused a C++
wrapper class for the data type (MAPM) which makes it fairly comfortable to
use and hides the ugly C stuff and messy memory management.

The result seems to be quite nice so far. Previously, I couldn't even calculate
my finances without eventually getting some rounding errors.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-04 20:47:41 +00:00
Stephan Aßmus
5a27d5c8a9 cosmetic
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-27 13:05:19 +00:00
Ithamar R. Adema
89f088e0da More (minor) GCC 4 fixes.....
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-14 21:02:30 +00:00
Stephan Aßmus
19f75b98e6 I hope Daniel is not upset, but Ingo and I have written a new parser:
* it supports white spaces
* it supports , and . for the decimal point
* it gives parse errors and where the error occured
* it supports more functions
I also added evaluating an expression given on the command line, it doesn't
show the UI then.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-07 22:05:03 +00:00