Convert Equations

This is a discussion on Convert Equations within the C++ Programming forums, part of the General Programming Boards category; I am new to C++ , and am trying to learn to convert professional equations to a linear form that ...

Convert Equations

I am new to C++ , and am trying to learn to convert professional equations to a linear form that C++ can understand.
Can any of you please tell me where to find a tutorial or guide on how to do this. I have Googled it and only found people trying to get someone else to do their homework. I need to learn how to do this.
Thank you.

What do you mean by "professional equations"? And how exactly does C++ understand linear equations?

Are you just trying to solve some equations, or do differentiation or something? Are you trying to determine intersections between quadratic or cubic equations or something more complicated? Is your equation hard-coded or are you writing a general solver?

You need to be more specific.

I can tell you that this is likely to be a lot harder than you expect. Even just parsing a string like "x^3 - 5*x^2" is a bit complicated.

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell

I suspect that SolarFlea is using "professional equations" to refer to equations in a document produced with the MathType editor, or something similar. Imperative programming (as defined in computer science) is also sometimes described in a manner that causes novices to describe it as coding in a "linear form".

If that is the case, s/he is seeking the impossible: essentially looking for a way to take equations from a document and generate imperative C++ code to represent or (maybe) solve them.

If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

I would look into Matlab if you have the $$ and are on Windows or Scilab if you don't and are on *NIX. Both will help you design advanced formulas for solving different things and then help convert them into C (at least) code...