Hardware Modules For Safe Integer And Floating-Point Arithmetic