One way to kill a Unisys mainframe COBOL application is to explicitly cause a divide by zero error. Doing this will cause a fatal program error.

Why would someone want to explicitly cause this error:

  • Database or other key data is not on file
  • Edits on data find bad information
  • Date checks on a file show that the file is too old

Of course, sometimes the error happens when it is unwanted. In cases like that, a programmer usually grumbles something about "bad data from the client" or the like, and never blames his or her self.

Apparently you can crasch fighter planes by dividing by zero, too. This I read somewhere a while ago:

This story was told by people from Motorola and is supposedly included in every microcontroller training course Motorola gives.

Test flights of F-16's were being conducted in Israel. The F-16's were doing low height rounds. On approach to the Dead Sea, the whole navigation system suddenly reset itself. The daring pilot landed the bird. HQ called up Motorola and ordered a team on the spot ASAP. The ground tests went perfectly, but every time the bird went airborn, it rebooted.

The pilots were getting restless. Flying on the border of hostile territory without navcom, with the Arabs pointing their earth-to-air missiles at anything that moves, wasn't that pleasant. Neither was debugging the whole navcom in-flight. Then someone figured it out.

The height of the Dead Sea relative to world sea level is -400 meters. As soon as the F-16 reached sea level, the navcom did a divide by zero, crashed, and rebooted.

Log in or registerto write something here or to contact authors.