On 27 March 2012 13:18, Gary Gregory <garydgregory@gmail.com> wrote:
> On Tue, Mar 27, 2012 at 5:50 AM, sebb <sebbaz@gmail.com> wrote:
>
>> 2012/3/27 "Detlef Günther" <Detlef.Guenther@gmx.net>:
>> > Hello,
>> >
>> > it would be nice to have an interpreter for mathematical expressions so
>> that functions may be defined at runtime.
>> >
>> > Example for f(x):
>> >
>> > ExpInter ei = new ExpInter();
>> > ei.setFunction("ln(3*sin(2*x)+3)");
>> > // Plot the function:
>> > for (double x=0.0;x<3.0;x+=0.1) {
>> > y = ei(x);
>> > // ... do something useful with x,y
>> > }
>> >
>>
>> Seems completely out of scope for Math to me.
>>
>> Besides, there are already scripting languages such as Commons JEXL
>> and BeanShell.
>>
>
> JavaScript is also baked in Java 6 and you can use any Java scripting
> enabled engine.
Further, Commons BSF 3 allows one to use any JSR223 (javax.scripting)
engine with Java 5.
There's also Commons BSF 2.x which gives access to an earlier version
of Java Scripting; there are quite a few languages that support it.

To unsubscribe, email: devunsubscribe@commons.apache.org
For additional commands, email: devhelp@commons.apache.org
