Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7777439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:08:31+00:00 2026-06-01T18:08:31+00:00

Possible Duplicate: automatically calculate string mathematical expressing in C# Could someone point me towards

  • 0

Possible Duplicate:
automatically calculate string mathematical expressing in C#

Could someone point me towards some resources which describe in detail how to simplify simple algebraic equations such as “5x+(2x*6x)+2” which should result in “12x^2+5x+2” the operators I need to handle are “+”,”-“,”*”,”/”,”^” and parenthesis. So far I have implemented a parser and evaluator for numeric terms which converts from in-fix to post-fix and then evaluates.

If someone could give me a basic run-down on how I could accomplish this it would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:08:32+00:00Added an answer on June 1, 2026 at 6:08 pm

    if you already have a tree internally that represents the equation, you can recursively visit each node to figure out if there’s a way to combine the terms of the two sub-nodes. Think about what you would do at each node, then think about boundary conditions (node is null, node has no children, etc.).

    Here is how I would approach it:

    1. visit each child in turn
    2. have a function that will find common powers for the same variable in the children and combine them
      a. consider multi-variable equations
      b. remember your output format vs. working copy format. You will need to transform the end result back into text.

    That’s a start. I think

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be
Possible Duplicate: Is there a way to automatically update application on Android? As a
Possible Duplicate: Is there a way to automatically update application on Android? I have
Possible Duplicate: When you exit a C application, is the malloc-ed memory automatically freed?
Possible Duplicate: NAnt or MSBuild, which one to choose and when? What is the
Possible Duplicate: When you exit a C application, is the malloc-ed memory automatically freed?
Possible Duplicate: Why is String.Concat not optimized to StringBuilder.Append? One day I was ranting
Possible Duplicate: Emitting unencoded strings in a Razor view I have a string that
Possible Duplicate: OpenEdge ABL automatically close a yes/no message after a certon amount of
Possible Duplicate: How to automatically start your service after install? I have a Visual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.