Skip to content

Use sqrt(x) instead of x^0.5 in several places.#4358

Merged
hubertus65 merged 3 commits intomodelica:masterfrom
HansOlsson:UseSqrt
Mar 27, 2024
Merged

Use sqrt(x) instead of x^0.5 in several places.#4358
hubertus65 merged 3 commits intomodelica:masterfrom
HansOlsson:UseSqrt

Conversation

@HansOlsson
Copy link
Copy Markdown
Contributor

@HansOlsson HansOlsson commented Mar 20, 2024

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 specially 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.

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.
@HansOlsson HansOlsson added the L: Fluid.Dissipation Issue addresses Modelica.Fluid.Dissipation label Mar 20, 2024
@hubertus65 hubertus65 merged commit 691f3f0 into modelica:master Mar 27, 2024
@beutlich beutlich added this to the MSL4.2.0 milestone Mar 27, 2024
@Harisankar-Allimangalath
Copy link
Copy Markdown
Contributor

@hubertus65 @DagBruck @HansOlsson we have to backport this to main\4.1.x right ?

@HansOlsson
Copy link
Copy Markdown
Contributor Author

@hubertus65 @DagBruck @HansOlsson we have to backport this to main\4.1.x right ?

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.

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

Labels

L: Fluid.Dissipation Issue addresses Modelica.Fluid.Dissipation L: Media Issue addresses Modelica.Media

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants