Re: [Boost-bugs] [Boost C++ Libraries] #12500: cpp_bin_float default value is NaN. But should be 0 according to the documentation.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12500: cpp_bin_float default value is NaN. But should be 0 according to the documentation.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-10-05 02:12:57


#12500: cpp_bin_float default value is NaN. But should be 0 according to the
documentation.
-------------------------------+----------------------------
  Reporter: alex@… | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost 1.62.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------------

Comment (by alex@…):

 To be more precise the default constructor code is:

 cpp_bin_float() BOOST_MP_NOEXCEPT_IF(noexcept(rep_type())) : m_data(),
 m_exponent(exponent_nan), m_sign(false) {}

 After I have adjusted it in my local copy of boost:

 cpp_bin_float() BOOST_MP_NOEXCEPT_IF(noexcept(rep_type())) : m_data(),
 m_exponent(exponent_zero), m_sign(false) {}

 it seems to create zeroes.
 That is I've replaced exponent_nan with exponent_zero.
 I am just not sure if this adjustment is sufficient and consistent.

 Thank you

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12500#comment:1>
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