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

Operator precedence and units #1128

Open
clinssen opened this issue Oct 17, 2024 · 1 comment
Open

Operator precedence and units #1128

clinssen opened this issue Oct 17, 2024 · 1 comment

Comments

@clinssen
Copy link
Contributor

The NESTML string "0 ms**-1" can be read as either "0 (ms**-1)", a rate of change of 0 per millisecond, or as "(0 ms)**-1", a division by zero error.

(To obtain the former, one can write "0 * ms**-1".)

Possibly, operator precedence rules should be changed such that the former interpretation is the default.

@tomtetzlaff
Copy link
Collaborator

I agree. By default, I would always intepret the empty space between "0" and "ms" in "0 ms" as a product "0ms", similarly to how things are in real life. With this and with the usual operator precedences, "0 ms**-1" would mean "0(ms**-1)".

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

No branches or pull requests

2 participants