I have a string, "-(1-cos(R*T))/R", that I need to be evaluated in both C and C#. Is there a library, or a quick way to do this? Or do I need to write my own parser?
I’m also assuming that R and T are known and are local variables.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s one on CodeProject that’s certainly worth a look. There’s also a blog post from 2007 that has a list (and benchmarks) of a number, including a half dozen or so that are free.