This function computes c=a/b
. It avoids divisions by zero by replacing
a/b
with a/eps
or a/b
whichever of the divisors is larger.
function div0protect extends Modelica.Icons.Function; import eps = Modelica.Constants.small; input Real a "Dividend"; input Real b "Divisor"; output Real c "Quotient"; end div0protect;