math - Expression Simplification Algorithm -


I am currently working on a calculator app and I think the output should be in both a simplified expression and a decimal second needed. An example would be sqrt 2 * sqrt 3 = sqrt 6 which can also be output as 2.44948 ... what is the best way and what is a well-established algorithm for doing so?

Yes, what is the likelihood of you, which are clearly composed of artifacts of math rules Understand formulas in the form.

Mathematica and MacSayma are such applications that do this. However, these are sophisticated systems and it is not easy to see how they "work".

What do you have to do:

  • Representations of sources as abstract syntax trees
  • Text formulas in this type of tree (your example equations)
  • Encoding a set of tree-manipulation rules that represent algebraic operations
  • Apply these rules to your algebra tree
  • When done If you go, print algebra trees beautifully as text

    Rules of algebra are written in the best form in the syntax (Mathematics does not do this, this formula has a type prefix S-expression and similar types of trees with special variable nodes Of trees).

    A problem is deciding how many "algebra" rules are you wiling to encode math is much higher than the algebra of pure 9th grade, and the use of such systems People who want to do more detail (What's the point of Mathematica and MacSiema: they grow infinitely) and want to expand there.

    Here is a very simple version of how you can see all the "gears" and how to rearrange rules and rules in parse trees, see how.



Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -