Opened 6 months ago

#13229 new Bugs

Infinite loop when printing certain values of type boost::multiprecision::mpfr_float.

Reported by: Victor Sunye <victor.sunye@…> Owned by:
Milestone: To Be Determined Component: None
Version: Boost 1.63.0 Severity: Problem
Keywords: Cc:


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)

mpfr.patch (497 bytes) - added by Victor Sunye <victor.sunye@…> 6 months ago.

Download all attachments as: .zip

Change History (1)

Changed 6 months ago by Victor Sunye <victor.sunye@…>

Attachment: mpfr.patch added

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.