Skip to content

Commit

Permalink
- cast to double so that 1/10 doesn't become zero
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Mar 4, 2016
1 parent a391fa9 commit b388aff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Compiler/FrontEnd/Expression.mo
Expand Up @@ -1558,7 +1558,10 @@ algorithm
case DAE.REAL_CLOCK(e)
then e;
case DAE.INTEGER_CLOCK(e, er)
then DAE.BINARY(e, DAE.DIV(DAE.T_REAL_DEFAULT), er);
then DAE.BINARY(
DAE.CAST(DAE.T_REAL_DEFAULT, e),
DAE.DIV(DAE.T_REAL_DEFAULT),
DAE.CAST(DAE.T_REAL_DEFAULT, er));
else
then DAE.RCONST(0.0);
end match;
Expand Down

0 comments on commit b388aff

Please sign in to comment.