modelica / ModelicaStandardLibrary

Free (standard conforming) library to model mechanical (1D/3D), electrical (analog, digital, machines), magnetic, thermal, fluid, control systems and hierarchical state machines. Also numerical functions and functions for strings, files and streams are included.
https://doc.modelica.org
BSD 3-Clause "New" or "Revised" License
452 stars 165 forks source link

AdditionalSqrt #4396

Open HansOlsson opened 2 months ago

HansOlsson commented 2 months ago

Follow-up to #4358 Making it a draft PR in case there is more missing.

henrikt-ma commented 2 months ago

Here are some regexp search results, including matches both in code and documentation:

Many of these are not in documentation, and I'm wondering if there could be any cases where raising to 0.5 is more correct than using sqrt?

HansOlsson commented 2 months ago

Will recheck. For the 2nd regexp in terms of unit-checking most don't seem to matter:

The following seem more concerning - but involve other exponents as well so should probably be a separate PR:

HansOlsson commented 2 months ago

Have now gone through all of them, the remaining ones are:

casella commented 1 week ago

@HansOlsson would you suggest some other reviewers to get this through?

HansOlsson commented 1 week ago

@HansOlsson would you suggest some other reviewers to get this through?

I believe you can review it, as some are part of media and possibly @AHaumer as it relates to complex numbers.

casella commented 4 hours ago

I have no strong opinion about this, I need to think about it.