test divide by zero, print an error and exit