Why does integer division by zero result in a floating point exception?

Does integer division actually use the FPU under the hood?

No, Linux just generates SIGFPE in this case too (it’s a legacy name whose usage has now been extended). Indeed, the Single Unix Specification defines SIGFPE as “Erroneous arithmetic operation“.

Leave a Comment