Opened 5 years ago
Closed 4 years ago
#13229 closed Bugs (fixed)
Infinite loop when printing certain values of type boost::multiprecision::mpfr_float.
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | multiprecision |
Version: | Boost 1.63.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The program below never terminates. The attached patch seems to solve the issue.
#include <boost/multiprecision/mpfr.hpp> #include <iostream>
int main (void) {
using mpfloat = boost::multiprecision::mpfr_float; mpfloat::default_precision (15); mpfloat x = 0.051;
std::cout.precision (1); std::cout << std::fixed << x << std::endl; return 0;
}
Attachments (1)
Change History (3)
by , 5 years ago
Attachment: | mpfr.patch added |
---|
comment:1 by , 4 years ago
Component: | None → multiprecision |
---|---|
Owner: | set to |
comment:2 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Good catch, fixed in develop.