When using a rational with an arbitrary precision integer as given by...
typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<0, 0, boost::multiprecision::signed_magnitude, boost::multiprecision::checked>> RationalIntType;
typedef boost::rational Rational;
The following will throw an exception...
Rational test(-2, -4);
This is due to the line
if (den < -(std::numeric_limits::max)()) {
BOOST_THROW_EXCEPTION(bad_rational("bad rational: non-zero singular denominator"));
}
in "template void rational::normalize()"
where std::numeric_limits::max() gives 0. Therefore all negative denominators will throw an exception.
In previous boost version there was no test against max().