Re: [math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread sebb
On 27 March 2012 13:18, Gary Gregory wrote: > On Tue, Mar 27, 2012 at 5:50 AM, sebb wrote: > >> 2012/3/27 "Detlef Günther" : >> > Hello, >> > >> > it would be nice to have an interpreter for mathematical expressions so >> that functions may be defined at runtime. >> > >> > Example for f(x): >> >

Re: [math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread Gary Gregory
On Tue, Mar 27, 2012 at 5:50 AM, sebb wrote: > 2012/3/27 "Detlef Günther" : > > 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("

Re: [math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread Thomas Neidhart
On Tue, Mar 27, 2012 at 1:32 PM, Gilles Sadowski < gil...@harfang.homelinux.org> wrote: > On Tue, Mar 27, 2012 at 12:53:25PM +0200, "Detlef Günther" wrote: > > Hi Thomas, > > > > congrace may be used by writing a wrapper "Expression" to > UnivarteFunction: > > > > > > import org.apache.commons.mat

Re: [math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread Bruce A Johnson
On Mar 27, 2012, at 5:55 AM, Gilles Sadowski wrote: > 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)"); >> /

Re: [math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread Gilles Sadowski
On Tue, Mar 27, 2012 at 12:53:25PM +0200, "Detlef Günther" wrote: > Hi Thomas, > > congrace may be used by writing a wrapper "Expression" to UnivarteFunction: > > > import org.apache.commons.math3.analysis.UnivariateFunction; > > import de.congrace.exp4j.Calculable; > import de.congrace.exp4j.E

Re: [math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread Detlef Günther
preter may be integrated in commons/math, the same result as my interpreter. Now I'll compare the functions implemented in congrace. Regards Detlef Original-Nachricht > Datum: Tue, 27 Mar 2012 10:10:41 +0200 > Von: Thomas Neidhart > An: Commons Dev

Re: [math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread Gilles Sadowski
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) { >

Re: [math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread sebb
2012/3/27 "Detlef Günther" : > 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.

Re: [math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread Thomas Neidhart
On Tue, Mar 27, 2012 at 10:06 AM, Thomas Neidhart wrote: > 2012/3/27 "Detlef Günther" > >> Hello, >> >> it would be nice to have an interpreter for mathematical expressions so >> that functions may be defined at runtime. >> > [snip] ah something else I have found that looks quite interesting an

Re: [math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread Thomas Neidhart
2012/3/27 "Detlef Günther" > 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

[math] Improvement: Interpreter for mathematical expressions

2012-03-27 Thread Detlef Günther
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); // ...