Changes between Initial Version and Version 1 of Ticket #5383, comment 3


Ignore:
Timestamp:
2019-03-18T15:52:36Z (6 years ago)
Author:
Karim Adbdelhak

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5383, comment 3

    initial v1  
    1111 {{{y[i] = if ud2[i] > eps then true else false;}}}
    1212
    13 2. Since equality on Real vars is only supported in functions use Modelica.Math.isEqual:
     132. Since equality on Real vars is only supported in functions use {{{Modelica.Math.isEqual}}}:
    1414
    1515 {{{y[i] = if ud2[i] > 0.0 and not Modelica.Math.isEqual(ud2[i],0.0) then true else false;}}}
     
    1919
    2020If this resolves the problem feel free to close the ticket!
     21
     22EDIT:
     23Just to clarify this: In most cases the check for equality on {{{>}}} or {{{>=}}} operators for float variables would be unnecessary, therefore it is not automatically done. If really need it could be added, but i would rather avoid that to keep simulation and compilation time down. Just catch equality with {{{Modelica.Math.isEqual}}} when needed.