[Boost-bugs] [Boost C++ Libraries] #12075: denorm_min is zero for float128

Subject: [Boost-bugs] [Boost C++ Libraries] #12075: denorm_min is zero for float128
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-03-19 08:24:48


#12075: denorm_min is zero for float128
------------------------------------+----------------------------
 Reporter: Ruslan <b7.10110111@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: multiprecision
  Version: Boost 1.60.0 | Severity: Problem
 Keywords: |
------------------------------------+----------------------------
 The following program demonstrates the bug:
 {{{
 #include <iostream>
 #include <limits>
 #include <boost/multiprecision/float128.hpp>

 boost::multiprecision::float128 typedef binary128;
 int main()
 {
     std::cout << "boost " BOOST_LIB_VERSION << "\n";
     std::cout << "boost denorm_min: " <<
 std::numeric_limits<binary128>::denorm_min() << "\n";
     __float128 trueDenormMin=0;
     *reinterpret_cast<char*>(&trueDenormMin)=1; // craft the denormal
 manually
     std::cout << "true denorm_min: " << binary128(trueDenormMin) << "\n";
 }
 }}}

 Its output is
 {{{
 boost 1_60
 boost denorm_min: 0
 true denorm_min: 6.47518e-4966
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12075>
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:19 UTC