The second type of error is the error. such an error occurs when an illegal mathematical operation is attempted during program execution (for example, attempting to divide by 0). these errors cause the program to return inf or nan, which is then used in further calculations