Skip to content

Operator precedence and units #1128

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

Open
clinssen opened this issue Oct 17, 2024 · 1 comment · May be fixed by #1202
Open

Operator precedence and units #1128

clinssen opened this issue Oct 17, 2024 · 1 comment · May be fixed by #1202

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

tomtetzlaff commented Oct 29, 2024

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

@pnbabu pnbabu linked a pull request Apr 23, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants