Mathematical Function - defining at run-time??

Quote:

>I am writing root finding algorithm's (bisection, newton-raphson, etc),

>and would like to prompt for the function at run-time. I had given up

>hope, except for a Fortraner who said Fortran could do it. Is it

>possible to prompt for a function, and to be able to solve it, or am I

>dreaming....

What you need is a mathematical expression parser...not too difficult

a program to construct. Once the expression is internally compiled

and represented, it is then possible to evaluate or otherwise manipulate

the function. This, however, falls into the realm of sci.math or

sci.math.symbolic, etc..

Best regards,

Derick.

--

+------------------------------------------------------------------------+

| Derick R. Qua-Gonzalez | ________ |

| Department of Physics, California State University | \ / |

| ``It is better to be hated for what one is, | \ / |

| than loved for what one is not.'' (A. Gide) | G \/ USA|

+-------------------------------------------------------------+----------+