|Description:||Mathematical Engine Runtime - Full Symbolic and Numeric operations|
Math Runtime is an accessor using Active URI syntax with the following base identifiers:
and the following arguments: (for more details on argument passing details see here)
|Representation (java.lang.Object)||expression to evaluate|
|varargs [varargs]||Any quantity||Representation (java.lang.Object)||Varargs allows an arbitrary number of additional unspecified arguments.|
The following verb is supported:
The response representation of this accessor for SOURCE requests is unknown.
This accessor throws no documented exceptions.
To use Math Runtime accessor you must import the module urn:org:netkernel:lang:math:
The Math language runtime provides a rich symbolic and numeric mathematical evaluation engine.
The operator argument must be transreptable to java.lang.String and is the mathematical expression to be evaluated.
is evaluated to the symbolic expansion...
This is an example of calculating the symbolic derivative (with respect to x)...
is evaluated to the symbolic expression...
Arbitrary named arguments may be supplied. Numeric arguments will be provided as numeric variables substituted into the operator expression.
x argument value: 2
will return the numeric result 1.0
Alternatively if the named argument is a String it will be parsed to an expression and substituted into the expression...
x argument value: y*z+3
will return the symbolic result (y*z+3)^2-3*(y*z+3)+1
Warning be careful with symbolic arguments to avoid recursive variable references (the same symbol in the argument as the argument name itself) which will result in a stack overflow exception.
The active:math engine can be used to create very rich and powerful mathematical pipeline processes, where the symbolic or numeric response of one stage is fed into a following stage - either as the operator or as an argument.
The active:math engine uses the Symja project which in turn incorporates many powerful math functions from Apache Commons-Math and JSA. A small set of examples are provided on the Symja site here.
A reference list is provided here.