See the GNU-R math library for examples of handling IEEE in special functions. glibc-2 provides more C9X features now, we can use that in the long run. I don't know if there is a C9X function to do extended to double rounding though (I don't think so).