Maths in C++

New to programming and was wondering if anyone could recommend any good sites or books or really what's the best and quickest way to pick up the C++ language. The other question I have is how C++ be used to write a program to find x so that it satisfies an equation such as this one: x/x - x/2 + x/4 = x/12.
PaulduberryAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
I'd really suggest 'Numerical Recipes: The Art of Scientific Computing, Third Edition in C++ (2007)' - you can browse it online for a 30 days trial period at http://www.nr.com/oldverswitcher.html - see http://www.nr.com/com/storefront.html
0
PaulduberryAuthor Commented:
Thanks for that.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

jkrCommented:
user_n, so how would you go about solving an equation given your link?
0
user_nCommented:
Sorry I have been thinking about math operations. You shold use the link if you have to write some equation. For x the answer is 3
0
user_nCommented:
You can not use a  progamming language to solve a problem. You should first find a way to solve the equation then a way to represent your way in programing language.


or you can use http://en.wikipedia.org/wiki/Mathematical_software
0
user_nCommented:
Or you should use a parser to parse the equation, to enter the values and see the result
0
PaulduberryAuthor Commented:
I figured the answer to be 3. However, what I was looking for was an approach to take using C++ giving it, for example, a range of numbers to select from (1-10). Could it be done using a loop? Remembering, of course, that I am a newbie to this.
0
PaulduberryAuthor Commented:
What kind of code is involved with a parser?
0
user_nCommented:
http://www.codeproject.com/KB/cs/MathParserLibrary.aspx
You will need parser.

You will have to code that x can not be 0.(you can not divide to 0)

But the easiest way I think will be with something like mathematica.
0
user_nCommented:
0
jkrCommented:
You might be interested in the following articles:

http://www.codeproject.com/KB/cpp/eqSolv.aspx ("Equation Solver in C")
http://www.codeproject.com/KB/recipes/nummethods.aspx ("Some simple numerical methods in C++")
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PaulduberryAuthor Commented:
Some interesting stuff here. I'll check back again in the morning and close. Thanks to the two experts that helped me.
0
PaulduberryAuthor Commented:
Thanks for the help guys. Didn't really find the wikipedia links particularly helpful for my question but ok for general information.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.