Use sqrt(x) instead of x^0.5 in several places.#4358
Merged
hubertus65 merged 3 commits intomodelica:masterfrom Mar 27, 2024
Merged
Use sqrt(x) instead of x^0.5 in several places.#4358hubertus65 merged 3 commits intomodelica:masterfrom
hubertus65 merged 3 commits intomodelica:masterfrom
Conversation
Some reasons: - Clarity; it is not an arbitrary exponent that happens to be 0.5, but exactly the square root. - Ease of unit-checking; the proposals handle sqrt special as well as integer exponents, but not real numbers that happen to be fractions.
DagBruck
approved these changes
Mar 20, 2024
hubertus65
approved these changes
Mar 27, 2024
Contributor
|
@hubertus65 @DagBruck @HansOlsson we have to backport this to main\4.1.x right ? |
Contributor
Author
I don't see a need. It will be important for better unit-checking, which is worked on for Modelica 3.7, but currently it works. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some reasons:
sqrtspecially as well as integer exponents, but not real numbers that happen to be fractions.Not necessary for 4.1.0 - but not problematic to add either.