Skip to content

Conversation

@beutlich
Copy link
Member

@beutlich beutlich commented Oct 4, 2017

Rewrite numberOfSymmetricBaseSystems as a non-recursive one-liner (that is auto-inlined)

@beutlich beutlich added the L: Electrical.MultiPhase Issue addresses Modelica.Electrical.MultiPhase label Oct 4, 2017
@beutlich beutlich added this to the MSL_next-MINOR-version milestone Oct 4, 2017
This way, tools can auto-inline the function.
@beutlich beutlich force-pushed the numberOfSymmetricBaseSystems branch from 486182c to e46a085 Compare October 4, 2017 09:33
@christiankral
Copy link
Contributor

Please be patient, I am considering your proposal, see https://trac.openmodelica.org/OpenModelica/ticket/4550

@sjoelund
Copy link
Member

I fixed one issue in OpenModelica; the remaining issue is with the model: log(m/2)/log(2) for m=4 is not exactly 1.0 depending on computation order (we do 1/log(2)=1.442695040888963 and we end up with 0.999999999997 instead of 1.0; integer() rounds that down).

@beutlich beutlich modified the milestones: MSL_next-MINOR-version, never Oct 19, 2017
@sjoelund
Copy link
Member

I talked a bit with @casella and I guess log((n+0.2)/2)/log(2) would fix any rounding errors. Not at a computer to check it though.

@beutlich
Copy link
Member Author

Right. No point to merge it then.

@beutlich beutlich closed this Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: Electrical.MultiPhase Issue addresses Modelica.Electrical.MultiPhase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants