Opened 4 years ago

Closed 4 years ago

#13608 closed Bugs (fixed)

multiprecision/mpfi typo

Reported by: Michael Burr <burr2@…> Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.66.0 Severity: Problem
Keywords: mpfi Cc:

Description

The version of boost that I'm using is through macports. I believe that there is a typo in multiprecision/mpfi.hpp. On line 478, digits2_2_10 should be replaced by digits10_2_2.

The original code is

void precision(unsigned digits10) BOOST_NOEXCEPT {

mpfi_set_prec(this->m_data, multiprecision::detail::digits2_2_10((digits10)));

}

The corrected code should be

void precision(unsigned digits10) BOOST_NOEXCEPT {

mpfi_set_prec(this->m_data, multiprecision::detail::digits10_2_2((digits10)));

}

This change means that with and without an argument, precision reverses the digits operation. Moreover, this matches the corresponding lines in mpfr.hpp.

Change History (1)

comment:1 by John Maddock, 4 years ago

Resolution: fixed
Status: newclosed

Yep, that's been fixed in develop already and is scheduled for the next release.

Note: See TracTickets for help on using tickets.