Eval

The string evaluator used is Eval.class from the Lundin Symbolic MathPackage.
Full information about this package can be got from http://www.javathings.com/mathpackage.html

A valid function string takes a form like "3*x+7" or "a*sin(x+5)". Note that the multiplication sign cannot be omitted.

The following operators and functions are supported by eval(..) in Eval.class :
+ addition
- subtraction
* multiplication
/ division
^ raise to power of.. ( ex. x^2 )
sqrt(..) squareroot
sin(..) trigonometric functions
cos(..) -"-
tan(..) -"-
cotan(..) -"-
asin(..) arcus functions
acos(..) -"-
atan(..) -"-
acotan(..) -"-
sinh(..) hyperbolic functions
cosh(..) -"-
tanh(..) -"-
exp(..) constant e raised to..
ln(..) the natural logaritm

abs(..) absolute value of....
ceil(..) Returns the smallest (closest to negative infinity)
value that is not less than the argument and is equal to
a mathematical integer.
Example: ceil( 3.2 ) = 4.0 , ceil( 9.9 ) = 10.0
floor(..) Returns the largest (closest to positive infinity)
value that is not greater than the argument and is
equal to a mathematical integer.
Example: floor( 3.2 ) = 3.0 , floor( 9.9 ) = 9.0
fac(..) faculty of...
n*(n-1)*(n-2)*..*1
sfac(..) semifaculty of..
n*(n-2)*(n-4)*..*4*2 if n is even
n*(n-2)*(n-4)*..*3*1 if n is not even
round(..) rounds the argument to the closest mathematical integer.
Example: round( 3.4 ) = 3.0, round( 4.99 ) = 5.0 etc...
fpart(..) returns the decimalvalue of its argument
Example: fpart(2.345) = 0.345, fpart(4) = 0.0 etc..
[base]log(..) any logaritm.
Example: 10log(10) = 1.0, exp(1)log(exp(1)) = 1.0
% Modulo.
Logical Operators Supported by eval(..) in Eval.class :
== Equal, returns 1.0 if it's arguments are equal or 0.0 othervise.
!= Not Equal, returns 1.0 if it's arguments are not equal or 0.0 othervise.
&& And, returns 1.0 if both arguments evaluates to 1.0, or 0.0 othervise.
|| Or, returns 1.0 if any of it's arguments evaluates to 1.0, or 0.0 othervise.
> Larger than, returns 1.0 if the value of the argument to the left is larger
than the value of the argument to the right, or 0.0 othervise.
< Less than, returns 1.0 if the value of the argument to the left is less
than the value of the argument to the right, or 0.0 othervise.
>= Larger than or equal to, returns 1.0 if the value of the argument to the left is larger
than or equal to the value of the argument to the right, or 0.0 othervise.
<= Less than or equal to, returns 1.0 if the value of the argument to the left is less
than or equal to the value of the argument to the right, or 0.0 othervise.
! Not, returns 0.0 if it's argument evaluates to 1.0 and returns 1.0 if
it's argument evaluates to anything other than 1.0

Operator Precedence:

!
cos sin tan sqrt exp.....etc
^
* / %
log
+ -
> >= < <=
== !=
||
&&

Constants and special values supported by eval(..) in Eval.class

These are reserved names, they cannot be used as variables.
pi Same value as java.lang.Math.PI, 3.14159.....
euler Same value as java.lang.Math.E, 2.7182...
infinity Same value as java.lang.Double.INFINITY
-infinity Same value as java.lang.Double.NEGATIVE_INFINITY
nan Same value as java.lang.Double.NaN
true 1.0
false 0.0