-
Notifications
You must be signed in to change notification settings - Fork 53
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
Failure to simplify units in very simple case #303
Comments
Thanks for the report. The reason this fails to simplify is that because you're first converting Multiplying If you instead calculate e.g.:
fend manages to correctly simplify the units. I'm not sure how to best fix this. One option would be to automatically drop the flag when the units change due to multiplication or such, but I'll need to carefully test to make sure this doesn't cause unintentional regressions. Also note that flags are only carried over from the value on the left-hand side, so |
I think it would be appropriate to simplify it anyway if the unit is exactly the same, i.e., not not just the same quantity but also the same actual unit. Also, what is the intended value of this "not simplifiable" flag and is it possible to disable with config? |
The flag is important because it prevents fend from auto-simplifying any calculations that are explicitly converted to a specific unit with For example:
It makes it possible to use units like Newton-metres without having them be auto-converted to joules. But anyway, reenabling auto-conversions after multiplying values (or doing other maths operations) does make sense I think, to make sure that calculations like |
The text was updated successfully, but these errors were encountered: