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

Inconsistent sqrt syntax #139

Open
timokoesters opened this issue Mar 30, 2024 · 3 comments
Open

Inconsistent sqrt syntax #139

timokoesters opened this issue Mar 30, 2024 · 3 comments

Comments

@timokoesters
Copy link
Contributor

√(2)×2 is 2√2, but
√2×2 = √4 = 2

I think multiplication should always be parsed as being outside of the sqrt.

@PaddiM8
Copy link
Owner

PaddiM8 commented Mar 30, 2024

Hmm this is a tricky one, because you would expect something like cos2x to be parsed as cos(2x) but sqrt2*2 as sqrt(2) * 2 I guess. Maybe it should make a distinction between implicit and explicit multiplication in this context? That's what Wolframalpha seems to do.

Your issues have been really helpful by the way. Thanks!

@timokoesters
Copy link
Contributor Author

Even better, WolframAlpha differentiates between cos 2 x and cos 2x. I think leaving a space is the same as explicit multiplication

@PaddiM8
Copy link
Owner

PaddiM8 commented Mar 30, 2024

Oh yeah that makes sense. A bit trickier to parse, but should be possible

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

2 participants