-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Incorrect value when using implicit multiplication #955
Comments
What worked was this:
But I always thought multiplication had a higher precedence than division? |
As far as I know, in all math applications multiplication and division have the same precedence (i.e. Update: fixed a typo in the example I gave |
Oh. I need some way to fix this as it appears to be a bug, like in the example I provided. |
This behavior is hardcoded in the expression parser, it's not configurable or something. There are discussions though to rethink the behavior of implicit multiplication, see #792. |
Thank you for linking me to the older issue. Hope it's implemented someday.
…On 17 Oct 2017 12:25 am, "Jos de Jong" ***@***.***> wrote:
This behavior is hardcoded in the expression parser, it's not configurable
or something. There are discussions though to rethink the behavior of
implicit multiplication, see #792
<#792>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#955 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGe6KlYXPIZIeQB0HtZlt3gYC9sqGGcTks5ss6aLgaJpZM4P3Z0T>
.
|
👍 let's close this issue and continue any discussion in #792. |
Ok:
math.eval("10000 / 10000")
=1
Fails:
math.eval("thousand = 1000");
math.eval("10 thousand / 10 thousand")
=1e+6
... Huh??I don't know if I'm doing something wrong or its a bug in math.js...
The text was updated successfully, but these errors were encountered: