Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23830 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Dec 17, 2014
1 parent 21a005c commit 7461209
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Compiler/BackEnd/ExpressionSolve.mo
Expand Up @@ -1420,19 +1420,19 @@ protected function simplifyBinaryMulCoeff
"generalization of ExpressionSimplify.simplifyBinaryMulCoeff2"
input DAE.Exp inExp;
output tuple<DAE.Exp, DAE.Exp> outRes;
algorithm
algorithm
outRes := match(inExp)
local
DAE.Exp e,e1,e2;
DAE.Exp coeff;

case ((e as DAE.CREF()))
then ((e, DAE.RCONST(1.0)));
then ((e, DAE.RCONST(1.0)));

case (DAE.BINARY(exp1 = e1,operator = DAE.POW(),exp2 = DAE.UNARY(operator = DAE.UMINUS(), exp = coeff)))
then
((e1, Expression.negate(coeff)));

case (DAE.BINARY(exp1 = e1,operator = DAE.POW(),exp2 = coeff))
then ((e1,coeff));

Expand Down Expand Up @@ -1553,7 +1553,7 @@ algorithm

rhs := DAE.IFEXP(con, e7 ,lhs);
lhs := e2;

end solveQE;

protected function solveIfExp
Expand Down
4 changes: 2 additions & 2 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -3780,14 +3780,14 @@ algorithm
then e;

// (e1/e2)^(-r) = (e2/e1)^r
case (DAE.BINARY(e3, DAE.DIV(), e4) , _) guard(isNegativeOrZero(e2))
case (DAE.BINARY(e3, DAE.DIV(), e4) , _) guard(isNegativeOrZero(e2))
then expPow(makeDiv(e4,e3), negate(e2));

// x^0.5 => sqrt(x)
case (_, _) guard(isHalf(e2))
then Expression.makePureBuiltinCall("sqrt",{e1},DAE.T_REAL_DEFAULT);

else equation
else equation
tp = typeof(e1);
b = DAEUtil.expTypeArray(tp);
op = if b then DAE.POW_ARR(tp) else DAE.POW(tp);
Expand Down

0 comments on commit 7461209

Please sign in to comment.