[Boost-bugs] [Boost C++ Libraries] #13608: multiprecision/mpfi typo

Subject: [Boost-bugs] [Boost C++ Libraries] #13608: multiprecision/mpfi typo
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-06-17 10:30:34


#13608: multiprecision/mpfi typo
------------------------------------+----------------------------
 Reporter: Michael Burr <burr2@…> | Owner: John Maddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: multiprecision
  Version: Boost 1.66.0 | Severity: Problem
 Keywords: mpfi |
------------------------------------+----------------------------
 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.

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13608>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-06-17 10:35:10 UTC