Skip to content

Commit

Permalink
DIVISION_SIM improved check, using old logic
Browse files Browse the repository at this point in the history
  • Loading branch information
vruge authored and OpenModelica-Hudson committed Nov 25, 2015
1 parent 9f2a0ec commit 6c58add
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SimulationRuntime/c/util/division.h
Expand Up @@ -41,7 +41,7 @@
#define DIVISION(a,b,c) (((b) != 0) ? ((a) / (b)) : ((a) / division_error_time(threadData, b, c, data->localData[0]->timeValue, __FILE__, __LINE__,data->simulationInfo.noThrowDivZero?1:0)))
#endif

#define DIVISION_SIM(a,b,msg,equation) (initial() && (a) == 0 && (b) == 0 ? 0 : ((b) != 0) ? ((a) / (b)) : ((a) / division_error_equation_time(threadData, a, b, msg, equation, data->localData[0]->timeValue, data->simulationInfo.noThrowDivZero?1:0)))
#define DIVISION_SIM(a,b,msg,equation) (((b) != 0) ? ((a) / (b)) : ( (a) == 0 && initial() ? 0 : ((a) / division_error_equation_time(threadData, a, b, msg, equation, data->localData[0]->timeValue, data->simulationInfo.noThrowDivZero?1:0))))

#define DIVISIONNOTIME(a,b,c) (((b) != 0) ? ((a) / (b)) : ((a) / division_error(threadData, b, c, __FILE__, __LINE__)))

Expand Down

0 comments on commit 6c58add

Please sign in to comment.