-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
BugSomething isn't workingSomething isn't working
Description
I haven't quite figured out why, but the program below seems to hang indefinitely in the frexp function. I can't reach the debug line. It seems like there might be some wrong assumptions in the frexp function. I remember myself having quite a bit of trouble with the impl of frexp. I think this is a real issue, but I can't yet figure out what's going on.
Basically, the argument to frexp is
which should be a valid decimal128_t for frexp, but maybe my assumptions in the test code are faulty?
#include <boost/decimal/decimal128_t.hpp>
#include <boost/decimal/cmath.hpp>
#include <boost/decimal/iostream.hpp>
volatile unsigned debug { };
auto main() -> int
{
boost::decimal::decimal128_t arg_x { 104743, 500 };
arg_x /= 204745;
{
std::stringstream strm { };
strm << std::setprecision(std::numeric_limits<boost::decimal::decimal128_t>::digits10)
<< "arg_x: " << arg_x;
std::cout << strm.str() << std::endl;
}
int exp2 { };
// The program hangs here in frexp.
const boost::decimal::decimal128_t frexp_result { frexp(arg_x, &exp2) };
++debug;
}
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working