This is about the simplest OpenMath application I could come up with. Type in an XML encoded OpenMath arithmetical expression with variables x and y in the text area, enter values for x and y, and press the Compute button.
| Version using the Riaca OpenMath Library: | Version using the PolyMath OpenMath Library: |
Expressions should be of type (floating point) number.
Only atoms and binary operators from the table below are
allowed.
Make sure x and y are the only variables occuring
in the expression.
Operators are applied to argument expressions in prefix notation
using the <OMA> tag.
|
|
||||||||||||||||||||
Here is an example of a valid expression representing (3x+5y):
<OMOBJ>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMF dec="3.0"/>
<OMV name="x"/>
</OMA>
<OMA>
<OMS cd="arith1" name="times"/>
<OMF dec="5.0"/>
<OMV name="y"/>
</OMA>
</OMA>
</OMOBJ>
More examples are available from the OpenMath website.
The Java Sources:
OMCalcRiacaApplet.java
|
OMCalcPolyMathApplet.java
|
OMCalcException.java
|
Jar Archives containing the OpenMath libraries:
omriaca.jar
|
(150 kB) | Riaca OpenMath Library. Includes Sun XML packages. |
ompolymath.jar
|
(500 kB) | PolyMath Development Group OpenMath Library. Includes IBM XML packages. |