What's new in v2.82
What's new in v2.81
AddUnit() method).
Eval() function
thread-safe with a precompiler constant.
acos(0)" to
misbehave.
What's new in v2.8
fpconfig.hh.
!=", "<=" and
">=".
fpconfig.hh or it can be completely disabled
there).
!".
eval()" function
(definable in fpconfig.hh). Now "eval()"
should never cause an infinite recursion.
(Note however, that it may still be relevant to disable it completely
because it is possible to write functions which take enormous amounts
of time to evaluate even when the maximum recursion level is not reached.)
What's new in v2.71
What's new in v2.7
^) to
make it closer in functionality to the power "operator" in mathematics
(ie. superscript):
"2^3^4" is
now evaluated as if it had been written as "2^(3^4)" (and not
as "(2^3)^4" like in previous versions).
"-2^3" will be evaluated as if
written as "-(2^3)", ie. the result is "-8" (and not "8" like in
previous versions). The unary minus in the exponent is still
evaluated first because of the right-left precedence change above
(that is, "-2^-3" is evaluated as "-(2^(-3))").
What's new in v2.63
What's new in v2.62
What's new in v2.61
What's new in v2.6
GetParseErrorType(). This method can be used to
get the type of parsing error (which can be used eg. for customized
error messages in another language).
,): Comma is not allowed
anymore anywhere else than separating function parameters. In other
words, comma is not an operator anymore (just a parameter separator).
What's new in v2.51:
What's new in v2.5:
AddConstant() method for adding constants to the parser.
AddFunction() methods for adding user-defined functions to the parser.
Parse().
cot(), csc() and sec().
Optimize() method (please consider
it still as experimental).
What's new in v2.4:
Optimize() method which tries to simplify the bytecode so that
it will be evaluated faster. Please note that this is still experimental.
atan2() and log10().
What's new in v2.3:
Parse() method can be even 40% faster
than in the previous version.
(Please be aware that the new parser has not been thoroughly tested;
bugs are possible.)
What's new in v2.22:
What's new in v2.21:
What's new in v2.2:
min(), max(), if(), eval().
if() and eval()).
=', '<', '>', '&' and '|'.
What's new in v2.1:
I implemented the parser from the scratch using a known parsing algorithm from classical compiler techniques, thus replacing my old ad hoc parser.
The parser should be much faster now, specially with long functions with lots of parentheses (specially when the expressions inside parentheses are very long).
I made a test with the function
"((2*(5+x*(cos(y-x)/3+2)/4)+1)/4+x)-1" in
a Sun Ultra 5 computer. The version 2.0 of the library parses it in
approximately 0.21 ms, while the new version 2.1 parses it in 0.115 ms.
(I performed the test by parsing the function 100000 times and then dividing
the total time by that.)
Needs lots of testing to make sure that it works!
What's new in v2.0:
Parse() takes the function as a
const std::string& (this is fully backwards
compatible).
Parse() takes the variables as a
const std::string& (eg. "xy"). The
old way of taking variable number of parameters was just a too awful
hack.
Eval() function taking a variable number of
parameters has been
removed. Although it was a bit easier to use, it was a hack and led to
inefficient code (internally the parameters were put inside a dynamically
allocated array anyways, and that's not the most efficient way of doing
it; it's much more efficient that the user uses a statically allocated
local array).
%) and a new function
int().
acos() vs. acosh()) are
gone. Needs more testing, though...
What's new in v1.3:
(Thanks to Roland Schmehl for these bug reports).
What's new in v1.21:
What's new in v1.2:
What's new in v1.1: