Skip to content

Commit

Permalink
- Use realLn
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Oct 28, 2010
1 parent 67e5538 commit 05f689c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Compiler/Ceval.mo
Expand Up @@ -1609,7 +1609,7 @@ algorithm
Values.REAL(rv_1);
case ("log",SOME("log"),{Values.REAL(real = rv)},_)
equation
rv_1 = realLog(rv);
rv_1 = realLn(rv);
then
Values.REAL(rv_1);
case ("log10",SOME("log10"),{Values.REAL(real = rv)},_)
Expand Down Expand Up @@ -3379,7 +3379,7 @@ algorithm
case (cache,env,{exp},impl,st,msg)
equation
(cache,Values.REAL(rv),_) = ceval(cache,env, exp, impl, st,NONE(), msg);
rv_1 = realLog(rv);
rv_1 = realLn(rv);
then
(cache,Values.REAL(rv_1),st);
end matchcontinue;
Expand Down
10 changes: 9 additions & 1 deletion Compiler/ExpressionSimplify.mo
Expand Up @@ -515,7 +515,15 @@ algorithm
case(DAE.CALL(path=path,expLst={e}))
equation
Builtin.isLog(path);
r = realLog(Expression.getRealConst(e));
r = realLn(Expression.getRealConst(e));
then
DAE.RCONST(r);

// log10 function
case(DAE.CALL(path=path,expLst={e}))
equation
Builtin.isLog10(path);
r = realLog10(Expression.getRealConst(e));
then
DAE.RCONST(r);

Expand Down

0 comments on commit 05f689c

Please sign in to comment.