The attached class allows you to evaluate mathematical expressions. Note that it is less powerful than the ExpressionEvaluator library:
https://www.b4x.com/android/forum/threads/expressionevaluator-library.7724/#content
The advantage of this class is that you can use it with B4A, B4J and B4i and that you can modify the source code if needed.
The source code itself is interesting. It first parses the string into numbers, operators and parenthesis. It also adds parenthesis at this point based on the operators precedences.
The next step is to recursively build a tree. The last step which is the simplest one is to recursively go over the tree and evaluate it.
Currently it only supports the four basic operators (-+/*).
Code:
Log(e.Eval("1.321/-2/-3.123 + (2 * 2 + 3) + 4"))
Consider it a beta version.