
Al, I tried compiling and executing this code simply to understand the issues. The compilation been successful but while executing I get below errors - ----- $ ./test-3.exe terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost: :exception_detail::error_info_injector<boost::math::rounding_error> >' what(): Error in function boost::math::iround<d>(d): Value -2147483648 can not be represented in the target integer type. Aborted (core dumped) $ ----- Above was did tried on Cygwin platform (1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin). And on Ubuntu, I have same error message while executing - ----- ./test-1 terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::math::rounding_error>
' what(): Error in function boost::math::iround<d>(d): Value -2147483648 can not be represented in the target integer type. Aborted
----- ~ BR ----- On Wed, Oct 12, 2011 at 4:38 PM, John Maddock <boost.regex@virgin.net>wrote:
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.
______________________________**_________________ Unsubscribe & other changes: http://lists.boost.org/** mailman/listinfo.cgi/boost<http://lists.boost.org/mailman/listinfo.cgi/boost>