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

Function raised to a power gives an error #23

Open
wassgha opened this issue Sep 19, 2016 · 2 comments
Open

Function raised to a power gives an error #23

wassgha opened this issue Sep 19, 2016 · 2 comments

Comments

@wassgha
Copy link

wassgha commented Sep 19, 2016

Hello, I have noticed a few features that are not implemented yet. I have solved most of them by pre-processing input from MathQuill. I use this code:

string.replace('\\right', '') # right tag .replace('\\left', '') # left tag .replace("^x","^{(x)}") # powers .replace("\ ","") #Spaces

However, one thing I couldn't solve without changing latex2sympy code is when a user inputs a function raised to a power (say sin^nx instead of (sinx)^n) latex2sympy crashes and gives NoneType' object has no attribute 'additive'.
Also, I believe hyperbolic trig functions are not supported yet (might be a very simple addition)
Can you please correct this? Thank you in advance!

@augustt198
Copy link
Owner

Yeah, there are a bunch of non-essential commands like \right that have to be ignored.

I hadn't noticed that exponents are so broken (I'm sure they worked better at one point). I'll fix that ASAP.

Hyperbolic trig functions (sinh, cosh, tanh, arsinh, arcosh, artanh) are currently supported, maybe you're on a different version?

@augustt198
Copy link
Owner

The exponent problem is fixed:
f569090

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

2 participants