[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Math parser
I got to thinking about math parsing for the plots. I'm thinking that it
would be a good idea to use the genius parser to let people use genius'
powerfull functions that they may already be comfortable with. a few
questions (in order of expected difficulty):
1) how hard would it be to have genius eval an expression and return a
double value?
2) how hard would it be to have genius parse an expression, and then fill
in different values for X and Y and reevaluate many times without
reparsing? mp_equation in canvas/ does this by parsing expressions into
RPN and evaluating them on demand, don't know if genius can do something
like this
3) can genius either do all of its calculations with doubles, or force gmp
to do so? for plotting arbitrary precision is really overkill and speed is
nice when doing large 3d plots. is this just a matter of setting the
precision in gmp or is it harder?
thanks, as soon as this is working all it should take is a GtkEntry and a
connected signal to allow a user to plot whatever function they want
to .. actually i could already do that just as easilly with mathparse but
i want to figure out the interface specifics first.
aaron lehmann