
12 Oct
2011
12 Oct
'11
11:08 a.m.
The docs of the Rounding Functions say:
If the argument v is either non-finite or else outside the range of the result type, then returns the result of rounding_error: by default this throws an instance of boost::math::rounding_error.
So the example shown below seems to show a bug, since std::numeric_limits<int>::min() is *not* outside the range of int. Or did I miss something?
It's a bug: the error checking is off by one for negative values. Fixed in Trunk. Thanks, John.