Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 3fa798f

Browse files
niklworsOpenModelica-Hudson
authored andcommitted
[cppruntime] Adapted zero function tolerance
Belonging to [master]: - #2829
1 parent 7a31ea6 commit 3fa798f

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Compiler/Template/CodegenCpp.tpl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12339,30 +12339,30 @@ template giveZeroFunc3(Integer index1, Exp relation, Text &varDecls /*BUFP*/,Tex
1233912339
case LESS(__) then
1234012340
<<
1234112341
if(_conditions[<%zerocrossingIndex%>])
12342-
f[<%index1%>]=(<%e1%> - 1e-9 - <%e2%>);
12342+
f[<%index1%>]=(<%e1%> - 1e-6 - <%e2%>);
1234312343
else
12344-
f[<%index1%>]=(<%e2%> - <%e1%> - 1e-9);
12344+
f[<%index1%>]=(<%e2%> - <%e1%> - 1e-6);
1234512345
>>
1234612346
case LESSEQ(__) then
1234712347
<<
1234812348
if(_conditions[<%zerocrossingIndex%>])
12349-
f[<%index1%>] = (<%e1%> - 1e-9 - <%e2%>);
12349+
f[<%index1%>] = (<%e1%> - 1e-6 - <%e2%>);
1235012350
else
12351-
f[<%index1%>] = (<%e2%> - <%e1%> - 1e-9);
12351+
f[<%index1%>] = (<%e2%> - <%e1%> - 1e-6);
1235212352
>>
1235312353
case GREATER(__) then
1235412354
<<
1235512355
if(_conditions[<%zerocrossingIndex%>])
12356-
f[<%index1%>] = (<%e2%> - <%e1%> - 1e-9);
12356+
f[<%index1%>] = (<%e2%> - <%e1%> - 1e-6);
1235712357
else
12358-
f[<%index1%>] = (<%e1%> - 1e-9 - <%e2%>);
12358+
f[<%index1%>] = (<%e1%> - 1e-6 - <%e2%>);
1235912359
>>
1236012360
case GREATEREQ(__) then
1236112361
<<
1236212362
if(_conditions[<%zerocrossingIndex%>])
12363-
f[<%index1%>] = (<%e2%> - <%e1%> - 1e-9);
12363+
f[<%index1%>] = (<%e2%> - <%e1%> - 1e-6);
1236412364
else
12365-
f[<%index1%>] = (<%e1%> - 1e-9 - <%e2%>);
12365+
f[<%index1%>] = (<%e1%> - 1e-6 - <%e2%>);
1236612366
>>
1236712367
else
1236812368
<<

0 commit comments

Comments
 (0)