Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MathQuill parser parses sin x^2 incorrectly #1

Open
nathancarter opened this issue Jan 7, 2018 · 0 comments
Open

MathQuill parser parses sin x^2 incorrectly #1

nathancarter opened this issue Jan 7, 2018 · 0 comments

Comments

@nathancarter
Copy link
Member

The MathQuill parser does not correctly prioritize exponentiation over trig function application.

Input: sin x sup 2

Output:

<OMA>
  <OMS cd="arith1" name="power"/>
  <OMA>
    <OMS cd="transc1" name="sin"/>
    <OMV name="x"/>
  </OMA>
  <OMI>2</OMI>
</OMA>

Expected output:

<OMA>
  <OMS cd="transc1" name="sin"/>
  <OMA>
    <OMS cd="arith1" name="power"/>
    <OMV name="x"/>
    <OMI>2</OMI>
  </OMA>
</OMA>

Steps we should take:

  1. Add a unit test to demonstrate this failure.
  2. Fix the definition in the source code.
  3. Ensure the new unit test now passes.
  4. Commit and push.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant