Re: [Boost-bugs] [Boost C++ Libraries] #11159: With float128 x = nan, the test x > 0 evaluates to true

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11159: With float128 x = nan, the test x > 0 evaluates to true
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-31 15:04:21


#11159: With float128 x = nan, the test x > 0 evaluates to true
-------------------------------+--------------------------------
  Reporter: charles@… | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost 1.57.0 | Severity: Problem
Resolution: | Keywords: float128 nan tests
-------------------------------+--------------------------------

Comment (by charles@…):

 I took a look at the code and see, for example in float128.hpp:
 {{{
    int compare(const float128_backend& o)const
    {
       return m_value == o.m_value ? 0 : m_value < o.m_value ? -1 : 1;
    }
 }}}
 Clearly, this approach to comparisons will fail with NaNs. There will
 need to
 be a 4th possible value to indicate "unordered".

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