Open HansOlsson opened 2 months ago
Here are some regexp search results, including matches both in code and documentation:
\^[ ]*[-]?[ ]*0.5
: 58 matches\^[ ]*[-]?[ ]*\([ ]*1[ ]*/[ ]*2[ ]*\)
: 18 matchesMany 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
?
Will recheck. For the 2nd regexp in terms of unit-checking most don't seem to matter:
lambdaREL0 := TREL^(1/2)*sum(a[i]*TREL^(i - 1) for i in 1:4);
Where TREL has unit 1Nu = 0.453*Re^(1/2)*Pr^(1/3);
(8*(1 + M[i]/M[j]))^(1/2)
Nu_3 = [2/(1+22*Pr)]^(1/6)*(Re*Pr*d_hyd/L)^(1/2)
documentation-class(Re*IN_con.d_hyd/IN_con.L)^(1/2)
- which has unit 1.The following seem more concerning - but involve other exponents as well so should probably be a separate PR:
Have now gone through all of them, the remaining ones are:
sqrt(x)
instead of x^0.5
is outweighed by the confusion caused by mixing sqrt(x)
and x^(1/3)
@HansOlsson would you suggest some other reviewers to get this through?
@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.
I have no strong opinion about this, I need to think about it.
Follow-up to #4358 Making it a draft PR in case there is more missing.