Division by Zero |
Top |
The division by zero is actually a non permitted operation. The divisions by zero are treated in TrySim as follows:
INT and DINT - division: Accu 1 gets the value 0
REAL - division: If accu 2 > 0.0, so the result will be +inf (infinite) and will be coded by hex 7F800000. If accu 2 < 0.0, so the result will be -inf (minus infinite) and will be coded by hex FF800000. If accu 2 = 0.0, so the result will be nan (not a number) and will be coded by hex FFFFFFFF.
See also:
|