Comments (7)
Even in the case of (2 + 3) + (x + y)
there won't be any Parenthesis
nodes, b/c it parses to:
( + ( + 2 3 ) ( + x y ) )
The only time we should need a Parenthesis
node is if we want to show x + (0) = (1)
in:
x + 3 = 4 => x + (3 - 3) = (4 - 3) => x + (0) = (1) => x + 0 = 1 => x = 1
from mathsteps.
When are new parens generated? I don't quite get this.
from mathsteps.
there aren't new parens, but rather sometimes parens stop being helpful
e.g. (2 + 3) * 10
=> 5 * 10
, not (5) * 10
so we get rid of parens that aren't necessary anymore after each step
does that make sense?
from mathsteps.
math-parser parses (2 + 3) * 10
to ( '*' ( '+' 2 3 ) 10 )
which has no parens in the AST. The parens should only show up when necessary when rendering to a string or to TeX. It looks like we're creating parens in a lot of places we probably shouldn't be.
from mathsteps.
oh, yeah the tree without as mnay parens and better printing function will make it way easier to not worry about parenthesis sweeet
though sometimes we'll still want them for pedagogical reasons (e.g. (2 + 3) + (x + y)
to show grouping)
from mathsteps.
I'm wondering if we'd ever need to reflatten the tree midway through the step by step solution, or if we can get by with the original structure of the tree and the manipulations along the way
from mathsteps.
A Parenthesis
node is also necessary if we wanted to show
x + (3 - 3) = (4 - 3)
instead of
x + (3 - 3) = 4 - 3
from mathsteps.
Related Issues (20)
- Can mathsteps handle derivative and integral? HOT 6
- x * (x - 1) = 1 ===>> throws 'Math error: No term with symbol: x , returning no steps' HOT 1
- How to run mathsteps on smartphone? HOT 1
- Severe security vulnerability HOT 5
- Missing parentheses when multiplying with a negative number HOT 5
- more things to add to linter
- Current Limitations HOT 1
- Mathsteps cannot handle quadratic equations HOT 4
- Development Status HOT 1
- handling latex input
- Script to browserify mathsteps
- compute a reverse expression HOT 1
- Fails when left node is only a parenthesis (eg "(x+1)=4", "((x)/(4))=4")
- Canceling out first variable throws error
- How to render these steps using Mathjax or something else? HOT 1
- Project Status and inactive email HOT 2
- bug : x-2/3=0
- Another bug : 2/x=3/4 HOT 2
- Adapting to iOS Swift
- Adapt README.md to link to the most active fork
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mathsteps.