Modify

Ticket #12075 (closed Bugs: fixed)

Opened 12 months ago

Last modified 12 months ago

denorm_min is zero for float128

Reported by: Ruslan <b7.10110111@…> Owned by: johnmaddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.60.0 Severity: Problem
Keywords: Cc:

Description

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

Attachments

Change History

comment:1 Changed 12 months ago by johnmaddock

  • Status changed from new to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.