TRAP_MATH and TRAP_ILLEGAL implemented and tested