-
Notifications
You must be signed in to change notification settings - Fork 1
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
Non-integer unit exponents? #48
Comments
(This is related to the issue of determining the units of |
In Myokit I've explicitly disallowed it, with zero errors and/or complaints so far, but I can imagine you might end up with them somehow? |
Strictly speaking the first is invalid (sqrt requires dimensionless args, similarly for exp) and pycml emits an error. For web lab code generation, we treat such errors just as warnings and proceed hoping the modeller put conversion factors in appropriately. Since some widely used models have these issues... The second option is allowed. But hopefully not done much! |
Really? So we allow m^(1/2) but not sqrt(m)? I would have thought having a rational in the exponent would be permissible before having a real was! |
Also sqrt(m^2) should be absolutely fine. For example if you measure the area of a square and want to deduce its length. I would say the input of sqrt() can have a unit, as long as its output doesn't have a non-integer unit... |
Good point, sorry, getting confused there. It is an error for exp() and trig functions, but not roots as you say. |
Are we allowing this:
?
and what about this:
?
The text was updated successfully, but these errors were encountered: