public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* string <-> function code
@ 2002-09-12  1:50 Dave Benson
  2002-09-15 15:44 ` Dave Benson
  2002-09-16  3:06 ` Brian Gough
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Benson @ 2002-09-12  1:50 UTC (permalink / raw)
  To: gsl-discuss

i've been working on code which allows users
to enter math expressions at runtime for a fair while.

i recently decided to beef up the code to include
differentiation and simplification.

looking at the TODO list, i thought it might
be nice if it could be in gsl.

features:
 - the usual operators (including precedence), functions etc.
 - the functions map R^n => R.
 - fairly optimized
 - interface for users to add new functions, operators, simplifiers
 - in the gnu coding style already
 - license is no problem (since i'm the author, and i'll make it GPL.)


problems:
 - uses glib 1.2 (the various typedefs and macros will have to
   be replaced with gsl equivalents -- i'm willing to do this)
 - no builtin support for matrix, complex, etc arguments
   (in a few cases complex numbers and fixed size matrices
    could be represented as arrays of reals, but that's ugly)
 - it could probably use a new name (currently MathFunction)

you might check it out at:
	http://www.ugcs.caltech.edu/~dbenson/mathfunction-0.0.0.tar.gz


any interest?  what's required?

- dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: string <-> function code
  2002-09-12  1:50 string <-> function code Dave Benson
@ 2002-09-15 15:44 ` Dave Benson
  2002-09-16  3:06 ` Brian Gough
  1 sibling, 0 replies; 4+ messages in thread
From: Dave Benson @ 2002-09-15 15:44 UTC (permalink / raw)
  To: gsl-discuss

so i made a rather large number of fixes and improvements;
rather than bothering the list with new versions,
just see:
	http://www.ugcs.caltech.edu/~dbenson/mathfunction.html
for all the latest ;)

thanks,
dave

On Wed, Sep 11, 2002 at 09:31:06AM -0700, Dave Benson wrote:
> i've been working on code which allows users
> to enter math expressions at runtime for a fair while.
> 
> i recently decided to beef up the code to include
> differentiation and simplification.
> 
> looking at the TODO list, i thought it might
> be nice if it could be in gsl.
> 
> features:
>  - the usual operators (including precedence), functions etc.
>  - the functions map R^n => R.
>  - fairly optimized
>  - interface for users to add new functions, operators, simplifiers
>  - in the gnu coding style already
>  - license is no problem (since i'm the author, and i'll make it GPL.)
> 
> 
> problems:
>  - uses glib 1.2 (the various typedefs and macros will have to
>    be replaced with gsl equivalents -- i'm willing to do this)
>  - no builtin support for matrix, complex, etc arguments
>    (in a few cases complex numbers and fixed size matrices
>     could be represented as arrays of reals, but that's ugly)
>  - it could probably use a new name (currently MathFunction)
> 
> you might check it out at:
> 	http://www.ugcs.caltech.edu/~dbenson/mathfunction-0.0.0.tar.gz
> 
> 
> any interest?  what's required?
> 
> - dave

-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: string <-> function code
  2002-09-12  1:50 string <-> function code Dave Benson
  2002-09-15 15:44 ` Dave Benson
@ 2002-09-16  3:06 ` Brian Gough
  1 sibling, 0 replies; 4+ messages in thread
From: Brian Gough @ 2002-09-16  3:06 UTC (permalink / raw)
  To: Dave Benson; +Cc: gsl-discuss

Dave Benson writes:
 > i've been working on code which allows users to enter math
 > expressions at runtime for a fair while.

Looks interesting, have you tried Formulc?
http://www.cs.brandeis.edu/~hhelf/formu/formulc.html

My goals for an ideal expression evaluator would be minimal size and
dependencies, pure ANSI-C and support for standard languages &
precedence (C/Fortran/..)  .. complex support could be useful (for
fortran) but if parameters have different types it's not so easy to
pass them in safely, similar problems for matrices/vectors...  beyond
scalar expressions it might be better to use a scripting language.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: String<->function code
@ 2002-09-16  6:53 Scott Fraser
  0 siblings, 0 replies; 4+ messages in thread
From: Scott Fraser @ 2002-09-16  6:53 UTC (permalink / raw)
  To: gsl-discuss


>My goals for an ideal expression evaluator would be minimal size and
>dependencies, pure ANSI-C and support for standard languages &
>precedence (C/Fortran/..)  .. complex support could be useful (for
>fortran) but if parameters have different types it's not so easy to
>pass them in safely, similar problems for matrices/vectors...  beyond
>scalar expressions it might be better to use a scripting language.

The problem with the different types can (hopefully!) be overcome using
operator overloading in C++, although I know that's not to everyone's
taste.  I'm hoping for this.

A couple of weeks ago I mentioned that I was working on an interpreter
for functions similar to maple, using GSL.  It stalled for a bit, but
the parser is now written and works with operator precedence for
everything except complex numbers and vectors/matrices, although they
should not be too difficult to apply.

As for functions, currently I've implemented polynomial solving and some
statistic's functions which give me enough to test the parser with.

Scott


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-16 10:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-12  1:50 string <-> function code Dave Benson
2002-09-15 15:44 ` Dave Benson
2002-09-16  3:06 ` Brian Gough
2002-09-16  6:53 String<->function code Scott Fraser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).