Searched defs:c99_rounding_control (Results 1 – 1 of 1) sorted by relevance
23 struct c99_rounding_control struct25 typedef int rounding_mode;27 static void set_rounding_mode(rounding_mode mode) { fesetround(mode); } in set_rounding_mode()28 static void get_rounding_mode(rounding_mode &mode) { mode = fegetround(); } in get_rounding_mode()29 static void downward() { set_rounding_mode(FE_DOWNWARD); } in downward()30 static void upward() { set_rounding_mode(FE_UPWARD); } in upward()31 static void to_nearest() { set_rounding_mode(FE_TONEAREST); } in to_nearest()32 static void toward_zero() { set_rounding_mode(FE_TOWARDZERO); } in toward_zero()35 static T to_int(const T& r) { return rint(r); } in to_int()