<cfenv> support

<cfenv>

IEEE 754 defines 5 rounding modes for Decimal Floating Point Types.

  1. Downward

  2. To nearest

  3. To nearest from zero

  4. Toward zero

  5. Upward

The default rounding mode is to nearest from zero (#3).
The rounding mode can only be changed at runtime. All constexpr calculations will use the default of to nearest from zero.
#include <boost/decimal/cfenv.hpp>

namespace boost {
namespace decimal {

enum class rounding_mode : unsigned
{
    fe_dec_downward = 1 << 0,
    fe_dec_to_nearest = 1 << 1,
    fe_dec_to_nearest_from_zero = 1 << 2,
    fe_dec_toward_zero = 1 << 3,
    fe_dec_upward = 1 << 4,
    fe_dec_default = fe_dec_to_nearest_from_zero
};

rounding_mode fegetround() noexcept;
rounding_mode fesetround(rounding_mode round) noexcept;

} //namespace decimal
} //namespace boost