Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Brackets stripped, even when simplify is false #89

Open
markspolakovs opened this issue Mar 21, 2018 · 0 comments
Open

Brackets stripped, even when simplify is false #89

markspolakovs opened this issue Mar 21, 2018 · 0 comments

Comments

@markspolakovs
Copy link

I'm working on a learning game, and I want to use Algebra.js to teach power rules (eg. (x^2)^3 becomes x^6).

The challenge I'm running into is that Algebra.js strips out brackets from the parsed expression, and then applies powers simply as repeated multiplication.

Example:
new algebra.Expression().add(algebra.parse("(x^2)"), false).pow(3, false).toString()

Expected:
> "(x^2)^3 "

Actual:
> "x^2x^2x^2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant