calling Algebrite.print() throws "ReferenceError: Eval_display is not defined"
See original GitHub issueI am trying to turn the result of Algebrite.simplify('x+x+x')
into a string. I thought Algebrite.print()
might do that, but it fails, throwing the exception “ReferenceError: Eval_display is not defined”.
Some background:
What I am actually trying to accomplish is testing whether two expressions (this could be equations, too) are equivalent to each other. I was using Algebrite.run(expr1) == Algebrite.run(expr2)
, but this has side effects and does not work for equations or inequalities. I thought simplify
might be the better way to go.
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (12 by maintainers)
Top Results From Across the Web
Uncaught ReferenceError: is not defined - Stack Overflow
The browser will try to find a global variable google , and a property into google named com , so it won't find,...
Read more >How to fix "Uncaught ReferenceError: x is not defined" in ...
JS Casts 04 - How to fix "Uncaught TypeError: x is not a function " in JavaScript.Visit https://javascriptcasts.com/episodes/04 for a summary ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So my idea was to run something like this piece of code
to replace each number in the input by a rational to avoid any floating point operations in Algebrite. It would not change
1/3
, since only the1
and the3
would be passed to the function, but it would turn0.5
into5/10
and3.3333
into33333/10000
.What is the more general case you mentioned? Where should I best add the test cases?
approxratio now works on entire expressions: https://github.com/davidedc/Algebrite/blob/eb1ed2e6a3720435f60ad88100329d58b733b88f/tests/approxratio.coffee . So this should cater for typical ratios entered as floats. Hopefully most people would still enter irrational and transcendental numbers with an appropriate expression rather than as a float. Those other cases to be picked up later.