5 rint may raise inexact (and it should not alter the fenv otherwise)
6 nearbyint must not raise inexact
8 (according to ieee754r section 7.9 both functions should raise invalid
9 when the input is signaling nan, but c99 does not define snan so saving
10 and restoring the entire fenv should be fine)
13 double nearbyint(double x) {