Re: [Boost-bugs] [Boost C++ Libraries] #12527: cpp_bin_float: Anal fixation. Part 3. Double rounding when result of convert_to<double>() is a subnormal

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12527: cpp_bin_float: Anal fixation. Part 3. Double rounding when result of convert_to<double>() is a subnormal
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-11-14 13:33:55


#12527: cpp_bin_float: Anal fixation. Part 3. Double rounding when result of
convert_to<double>() is a subnormal
-------------------------------+----------------------------
  Reporter: Michael Shatz | Owner: johnmaddock
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost 1.62.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------------

Comment (by Michael Shatz):

 It seems to me, one simple change is sufficient to get to acceptable
 speed:
 Replace:

 {{{
    cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> arg;

 }}}

 With


 {{{
    cpp_bin_float<((std::numeric_limits<Float>::digits-1)/64 + 1)*64,
 DigitBase, Allocator, Exponent, MinE, MaxE> arg;

 }}}

 That's enough to get speed of convert_to<double>() and convert_to<float>()
 to about 80% of the speed of my variant.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12527#comment:17>
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 : 2017-02-16 18:50:20 UTC