Move floating point rounding and exceptions handling to math
(it's C99 as well, not just POSIX)