Changes between Initial Version and Version 1 of Ticket #5383, comment 3
- Timestamp:
- 2019-03-18T15:52:36Z (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5383, comment 3
initial v1 11 11 {{{y[i] = if ud2[i] > eps then true else false;}}} 12 12 13 2. Since equality on Real vars is only supported in functions use Modelica.Math.isEqual:13 2. Since equality on Real vars is only supported in functions use {{{Modelica.Math.isEqual}}}: 14 14 15 15 {{{y[i] = if ud2[i] > 0.0 and not Modelica.Math.isEqual(ud2[i],0.0) then true else false;}}} … … 19 19 20 20 If this resolves the problem feel free to close the ticket! 21 22 EDIT: 23 Just 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.