.BusinessSimulation.Converters.Division_Guarded

Division guarded for division by zero

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

The output y is obtained by guarded division of the nominator input u1 and the denominator input u2:

y = u1/u2

If u2 is equal to zero, then outputIfZero is returned.

Implementation

y = if noEvent(u2 < 0 or u2 > 0) then u1 / u2 else outputIfZero;

See also

Division


Generated at 2025-04-01T18:24:36Z by OpenModelicaOpenModelica 1.24.5 using GenerateDoc.mos