Skip to content

Function for Evaluation of Mathematical Expression

saturnolguin

Asked Mar 19, 2004, 6:26 PM EST2 answers
Share
LinkedInX
Hi friends

I need a function for evalution of mathematical expression for example:
x+5Cos(2x)-Sin(4x+3).... with x = n value and the function return a value in doble excuseme but I don´t know write English good.

Thank you.

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    How are you going to use it? You just need to calculate predefined formula? Or, your user inputs a formula, and it need to be calculated? At first, you could have a look at System.Math class, that has some functions as static members.
    0
  • 0
    Hi, You can use the System.Math class for all your expression like cos, sin. There you have static methods like Math.Sin(double param) Math.Cos(double param)
    0